diff options
author | Andrew John Hughes <ahughes@redhat.com> | 2011-01-11 19:46:05 +0000 |
---|---|---|
committer | Andrew John Hughes <gandalf@gcc.gnu.org> | 2011-01-11 19:46:05 +0000 |
commit | dc6715320db92089b3c1b046157b56b5680738a5 (patch) | |
tree | 0da7dbb2f6c016ebe1a6d0bf012840bd76da9170 /libjava/classpath/gnu/xml | |
parent | 9a270ad3c0ba0eb21d09657f8fb3a7786a69ec5d (diff) | |
download | gcc-dc6715320db92089b3c1b046157b56b5680738a5.zip gcc-dc6715320db92089b3c1b046157b56b5680738a5.tar.gz gcc-dc6715320db92089b3c1b046157b56b5680738a5.tar.bz2 |
Normalise whitespace in GNU Classpath.
2010-06-03 Andrew John Hughes <ahughes@redhat.com>
* examples/gnu/classpath/examples/CORBA/NamingService/Demo.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPass.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturn.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNode.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterImplBase.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterStub.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/CanvasWorld.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/ChatConstants.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/ClientFrame.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/Demo.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/GameManager.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/GameManagerImpl.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/IorReader.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/OrbStarter.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/Player.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/PlayerImpl.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/PlayingDesk.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/State.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/X5Server.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/_GameManagerImpl_Tie.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/_GameManager_Stub.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/_PlayerImpl_Tie.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/_Player_Stub.java,
* examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java,
* examples/gnu/classpath/examples/awt/Demo.java,
* examples/gnu/classpath/examples/awt/HintingDemo.java,
* examples/gnu/classpath/examples/datatransfer/Demo.java,
* examples/gnu/classpath/examples/html/Demo.java,
* examples/gnu/classpath/examples/java2d/J2dBenchmark.java,
* examples/gnu/classpath/examples/java2d/J2dBenchmarkGUI.java,
* examples/gnu/classpath/examples/java2d/JNIOverhead.java,
* examples/gnu/classpath/examples/jawt/DemoJAWT.java,
* examples/gnu/classpath/examples/management/TestClassLoading.java,
* examples/gnu/classpath/examples/management/TestCompilation.java,
* examples/gnu/classpath/examples/management/TestGarbageCollector.java,
* examples/gnu/classpath/examples/management/TestMemory.java,
* examples/gnu/classpath/examples/management/TestMemoryManager.java,
* examples/gnu/classpath/examples/management/TestMemoryPool.java,
* examples/gnu/classpath/examples/management/TestThread.java,
* examples/gnu/classpath/examples/midi/Demo.java,
* examples/gnu/classpath/examples/print/Demo.java,
* examples/gnu/classpath/examples/sound/AudioPlayerSample.java,
* examples/gnu/classpath/examples/swing/BrowserEditorKit.java,
* examples/gnu/classpath/examples/swing/ButtonDemo.java,
* examples/gnu/classpath/examples/swing/ComboBoxDemo.java,
* examples/gnu/classpath/examples/swing/Demo.java,
* examples/gnu/classpath/examples/swing/DemoFactory.java,
* examples/gnu/classpath/examples/swing/DocumentFilterDemo.java,
* examples/gnu/classpath/examples/swing/FileChooserDemo.java,
* examples/gnu/classpath/examples/swing/HtmlDemo.java,
* examples/gnu/classpath/examples/swing/ListDemo.java,
* examples/gnu/classpath/examples/swing/MetalThemeEditor.java,
* examples/gnu/classpath/examples/swing/NavigationFilterDemo.java,
* examples/gnu/classpath/examples/swing/ScrollBarDemo.java,
* examples/gnu/classpath/examples/swing/SliderDemo.java,
* examples/gnu/classpath/examples/swing/SpinnerDemo.java,
* examples/gnu/classpath/examples/swing/TabbedPaneDemo.java,
* examples/gnu/classpath/examples/swing/TableDemo.java,
* examples/gnu/classpath/examples/swing/TextAreaDemo.java,
* examples/gnu/classpath/examples/swing/TextFieldDemo.java,
* examples/gnu/classpath/examples/swing/TreeDemo.java,
* external/jsr166/java/util/ArrayDeque.java,
* external/jsr166/java/util/concurrent/ArrayBlockingQueue.java,
* external/jsr166/java/util/concurrent/ConcurrentHashMap.java,
* external/jsr166/java/util/concurrent/ConcurrentSkipListMap.java,
* external/jsr166/java/util/concurrent/ConcurrentSkipListSet.java,
* external/jsr166/java/util/concurrent/CopyOnWriteArraySet.java,
* external/jsr166/java/util/concurrent/CyclicBarrier.java,
* external/jsr166/java/util/concurrent/DelayQueue.java,
* external/jsr166/java/util/concurrent/Executors.java,
* external/jsr166/java/util/concurrent/FutureTask.java,
* external/jsr166/java/util/concurrent/LinkedBlockingDeque.java,
* external/jsr166/java/util/concurrent/LinkedBlockingQueue.java,
* external/jsr166/java/util/concurrent/PriorityBlockingQueue.java,
* external/jsr166/java/util/concurrent/ScheduledExecutorService.java,
* external/jsr166/java/util/concurrent/ScheduledThreadPoolExecutor.java,
* external/jsr166/java/util/concurrent/Semaphore.java,
* external/jsr166/java/util/concurrent/SynchronousQueue.java,
* external/jsr166/java/util/concurrent/ThreadPoolExecutor.java,
* external/jsr166/java/util/concurrent/atomic/AtomicInteger.java,
* external/jsr166/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java,
* external/jsr166/java/util/concurrent/atomic/AtomicLong.java,
* external/jsr166/java/util/concurrent/atomic/AtomicLongFieldUpdater.java,
* external/jsr166/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java,
* external/jsr166/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java,
* external/jsr166/java/util/concurrent/locks/AbstractQueuedSynchronizer.java,
* external/jsr166/java/util/concurrent/locks/ReentrantReadWriteLock.java,
* external/relaxngDatatype/org/relaxng/datatype/Datatype.java,
* external/relaxngDatatype/org/relaxng/datatype/DatatypeBuilder.java,
* external/relaxngDatatype/org/relaxng/datatype/DatatypeException.java,
* external/relaxngDatatype/org/relaxng/datatype/DatatypeLibrary.java,
* external/relaxngDatatype/org/relaxng/datatype/DatatypeLibraryFactory.java,
* external/relaxngDatatype/org/relaxng/datatype/DatatypeStreamingValidator.java,
* external/relaxngDatatype/org/relaxng/datatype/ValidationContext.java,
* external/relaxngDatatype/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java,
* external/relaxngDatatype/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java,
* external/relaxngDatatype/org/relaxng/datatype/helpers/StreamingValidatorImpl.java,
* 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/XMLReader.java,
* 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/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/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,
* gnu/CORBA/BigDecimalHelper.java,
* gnu/CORBA/CDR/AbstractCdrInput.java,
* gnu/CORBA/CDR/AbstractCdrOutput.java,
* gnu/CORBA/CDR/AbstractDataInput.java,
* gnu/CORBA/CDR/AbstractDataOutput.java,
* gnu/CORBA/CDR/AligningInput.java,
* gnu/CORBA/CDR/AligningOutput.java,
* gnu/CORBA/CDR/ArrayValueHelper.java,
* gnu/CORBA/CDR/BigEndianInputStream.java,
* gnu/CORBA/CDR/BigEndianOutputStream.java,
* gnu/CORBA/CDR/BufferedCdrOutput.java,
* gnu/CORBA/CDR/BufferredCdrInput.java,
* gnu/CORBA/CDR/HeadlessInput.java,
* gnu/CORBA/CDR/IDLTypeHelper.java,
* gnu/CORBA/CDR/LittleEndianOutputStream.java,
* gnu/CORBA/CDR/UnknownExceptionCtxHandler.java,
* gnu/CORBA/CDR/VMVio.java,
* gnu/CORBA/CDR/Vio.java,
* gnu/CORBA/CDR/gnuRuntime.java,
* gnu/CORBA/CDR/gnuValueStream.java,
* gnu/CORBA/CdrEncapsCodecImpl.java,
* gnu/CORBA/CollocatedOrbs.java,
* gnu/CORBA/Connected_objects.java,
* gnu/CORBA/DefaultSocketFactory.java,
* gnu/CORBA/DuplicateNameHolder.java,
* gnu/CORBA/DynAn/AbstractAny.java,
* gnu/CORBA/DynAn/DivideableAny.java,
* gnu/CORBA/DynAn/NameValuePairHolder.java,
* gnu/CORBA/DynAn/RecordAny.java,
* gnu/CORBA/DynAn/ValueChangeListener.java,
* gnu/CORBA/DynAn/gnuDynAny.java,
* gnu/CORBA/DynAn/gnuDynAnyFactory.java,
* gnu/CORBA/DynAn/gnuDynArray.java,
* gnu/CORBA/DynAn/gnuDynEnum.java,
* gnu/CORBA/DynAn/gnuDynFixed.java,
* gnu/CORBA/DynAn/gnuDynSequence.java,
* gnu/CORBA/DynAn/gnuDynUnion.java,
* gnu/CORBA/DynAn/gnuDynValue.java,
* gnu/CORBA/DynAn/gnuDynValueBox.java,
* gnu/CORBA/DynAnySeqHolder.java,
* gnu/CORBA/EmptyExceptionHolder.java,
* gnu/CORBA/ForwardRequestHelper.java,
* gnu/CORBA/GIOP/CharSets_OSF.java,
* gnu/CORBA/GIOP/CloseMessage.java,
* gnu/CORBA/GIOP/ErrorMessage.java,
* gnu/CORBA/GIOP/MessageHeader.java,
* gnu/CORBA/GIOP/ServiceContext.java,
* gnu/CORBA/GIOP/v1_2/RequestHeader.java,
* gnu/CORBA/GeneralHolder.java,
* gnu/CORBA/IOR.java,
* gnu/CORBA/Interceptor/ClientRequestInterceptors.java,
* gnu/CORBA/Interceptor/ForwardRequestHolder.java,
* gnu/CORBA/Interceptor/IORInterceptors.java,
* gnu/CORBA/Interceptor/Registrator.java,
* gnu/CORBA/Interceptor/ServerRequestInterceptors.java,
* gnu/CORBA/Interceptor/gnuClientRequestInfo.java,
* gnu/CORBA/Interceptor/gnuIcCurrent.java,
* gnu/CORBA/Interceptor/gnuIorInfo.java,
* gnu/CORBA/Interceptor/gnuServerRequestInfo.java,
* gnu/CORBA/IorDelegate.java,
* gnu/CORBA/IorObject.java,
* gnu/CORBA/Minor.java,
* gnu/CORBA/NameDynAnyPairHolder.java,
* gnu/CORBA/NameDynAnyPairSeqHolder.java,
* gnu/CORBA/NameValuePairHolder.java,
* gnu/CORBA/NameValuePairSeqHolder.java,
* gnu/CORBA/NamingService/NameParser.java,
* gnu/CORBA/NamingService/NamingMap.java,
* gnu/CORBA/NamingService/NamingServiceTransient.java,
* gnu/CORBA/NamingService/TransientContext.java,
* gnu/CORBA/ObjectCreator.java,
* gnu/CORBA/OrbFocused.java,
* gnu/CORBA/OrbFunctional.java,
* gnu/CORBA/OrbRestricted.java,
* gnu/CORBA/Poa/AOM.java,
* gnu/CORBA/Poa/AccessiblePolicy.java,
* gnu/CORBA/Poa/DynamicImpHandler.java,
* gnu/CORBA/Poa/ForwardRequestHolder.java,
* gnu/CORBA/Poa/ForwardedServant.java,
* gnu/CORBA/Poa/InvalidPolicyHolder.java,
* gnu/CORBA/Poa/LocalDelegate.java,
* gnu/CORBA/Poa/LocalRequest.java,
* gnu/CORBA/Poa/LocalServerRequest.java,
* gnu/CORBA/Poa/ORB_1_4.java,
* gnu/CORBA/Poa/ServantDelegateImpl.java,
* gnu/CORBA/Poa/StandardPolicies.java,
* gnu/CORBA/Poa/gnuAdapterActivator.java,
* gnu/CORBA/Poa/gnuForwardRequest.java,
* gnu/CORBA/Poa/gnuIdAssignmentPolicy.java,
* gnu/CORBA/Poa/gnuIdUniquenessPolicy.java,
* gnu/CORBA/Poa/gnuImplicitActivationPolicy.java,
* gnu/CORBA/Poa/gnuLifespanPolicy.java,
* gnu/CORBA/Poa/gnuPOA.java,
* gnu/CORBA/Poa/gnuPOAManager.java,
* gnu/CORBA/Poa/gnuPoaCurrent.java,
* gnu/CORBA/Poa/gnuRequestProcessingPolicy.java,
* gnu/CORBA/Poa/gnuServantObject.java,
* gnu/CORBA/Poa/gnuServantRetentionPolicy.java,
* gnu/CORBA/Poa/gnuThreadPolicy.java,
* gnu/CORBA/ServiceRequestAdapter.java,
* gnu/CORBA/SetOverrideTypeHolder.java,
* gnu/CORBA/SimpleDelegate.java,
* gnu/CORBA/SocketRepository.java,
* gnu/CORBA/StreamHolder.java,
* gnu/CORBA/TypeCodeHelper.java,
* gnu/CORBA/TypeKindNamer.java,
* gnu/CORBA/Version.java,
* gnu/CORBA/_PolicyImplBase.java,
* gnu/CORBA/gnuAny.java,
* gnu/CORBA/gnuCodecFactory.java,
* gnu/CORBA/gnuEnvironment.java,
* gnu/CORBA/gnuRequest.java,
* gnu/CORBA/gnuValueHolder.java,
* gnu/CORBA/interfaces/SocketFactory.java,
* gnu/CORBA/typecodes/AliasTypeCode.java,
* gnu/CORBA/typecodes/ArrayTypeCode.java,
* gnu/CORBA/typecodes/FixedTypeCode.java,
* gnu/CORBA/typecodes/GeneralTypeCode.java,
* gnu/CORBA/typecodes/PrimitiveTypeCode.java,
* gnu/CORBA/typecodes/RecordTypeCode.java,
* gnu/CORBA/typecodes/RecursiveTypeCode.java,
* gnu/CORBA/typecodes/StringTypeCode.java,
* gnu/classpath/Pair.java,
* gnu/classpath/Pointer.java,
* gnu/classpath/Pointer32.java,
* gnu/classpath/Pointer64.java,
* gnu/classpath/ServiceFactory.java,
* gnu/classpath/ServiceProviderLoadingAction.java,
* gnu/classpath/SystemProperties.java,
* gnu/classpath/debug/Component.java,
* gnu/classpath/debug/PreciseFilter.java,
* gnu/classpath/debug/SystemLogger.java,
* gnu/classpath/debug/TeeInputStream.java,
* gnu/classpath/debug/TeeReader.java,
* gnu/classpath/jdwp/Jdwp.java,
* gnu/classpath/jdwp/JdwpConstants.java,
* gnu/classpath/jdwp/event/BreakpointEvent.java,
* gnu/classpath/jdwp/event/ClassPrepareEvent.java,
* gnu/classpath/jdwp/event/ClassUnloadEvent.java,
* gnu/classpath/jdwp/event/Event.java,
* gnu/classpath/jdwp/event/EventManager.java,
* gnu/classpath/jdwp/event/EventRequest.java,
* gnu/classpath/jdwp/event/ExceptionEvent.java,
* gnu/classpath/jdwp/event/MethodEntryEvent.java,
* gnu/classpath/jdwp/event/MethodExitEvent.java,
* gnu/classpath/jdwp/event/SingleStepEvent.java,
* gnu/classpath/jdwp/event/ThreadEndEvent.java,
* gnu/classpath/jdwp/event/VmDeathEvent.java,
* gnu/classpath/jdwp/event/VmInitEvent.java,
* gnu/classpath/jdwp/event/filters/ClassExcludeFilter.java,
* gnu/classpath/jdwp/event/filters/ClassMatchFilter.java,
* gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java,
* gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java,
* gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java,
* gnu/classpath/jdwp/event/filters/InstanceOnlyFilter.java,
* gnu/classpath/jdwp/event/filters/StepFilter.java,
* gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java,
* gnu/classpath/jdwp/exception/InvalidClassException.java,
* gnu/classpath/jdwp/exception/InvalidClassLoaderException.java,
* gnu/classpath/jdwp/exception/InvalidEventTypeException.java,
* gnu/classpath/jdwp/exception/InvalidFieldException.java,
* gnu/classpath/jdwp/exception/InvalidFrameException.java,
* gnu/classpath/jdwp/exception/InvalidLocationException.java,
* gnu/classpath/jdwp/exception/InvalidMethodException.java,
* gnu/classpath/jdwp/exception/InvalidObjectException.java,
* gnu/classpath/jdwp/exception/InvalidSlotException.java,
* gnu/classpath/jdwp/exception/InvalidStringException.java,
* gnu/classpath/jdwp/exception/InvalidThreadException.java,
* gnu/classpath/jdwp/exception/InvalidThreadGroupException.java,
* gnu/classpath/jdwp/exception/NativeMethodException.java,
* gnu/classpath/jdwp/exception/NotImplementedException.java,
* gnu/classpath/jdwp/id/JdwpId.java,
* gnu/classpath/jdwp/id/NullObjectId.java,
* gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java,
* gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/ClassTypeCommandSet.java,
* gnu/classpath/jdwp/processor/CommandSet.java,
* gnu/classpath/jdwp/processor/EventRequestCommandSet.java,
* gnu/classpath/jdwp/processor/FieldCommandSet.java,
* gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java,
* gnu/classpath/jdwp/processor/MethodCommandSet.java,
* gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/PacketProcessor.java,
* gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java,
* gnu/classpath/jdwp/processor/StackFrameCommandSet.java,
* gnu/classpath/jdwp/processor/StringReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java,
* gnu/classpath/jdwp/transport/JdwpCommandPacket.java,
* gnu/classpath/jdwp/transport/JdwpConnection.java,
* gnu/classpath/jdwp/transport/JdwpPacket.java,
* gnu/classpath/jdwp/transport/JdwpReplyPacket.java,
* gnu/classpath/jdwp/transport/SocketTransport.java,
* gnu/classpath/jdwp/transport/TransportFactory.java,
* gnu/classpath/jdwp/util/JdwpString.java,
* gnu/classpath/jdwp/util/LineTable.java,
* gnu/classpath/jdwp/util/Location.java,
* gnu/classpath/jdwp/util/MethodResult.java,
* gnu/classpath/jdwp/util/MonitorInfo.java,
* gnu/classpath/jdwp/util/Signature.java,
* gnu/classpath/jdwp/util/VariableTable.java,
* gnu/classpath/jdwp/value/ArrayValue.java,
* gnu/classpath/jdwp/value/BooleanValue.java,
* gnu/classpath/jdwp/value/ByteValue.java,
* gnu/classpath/jdwp/value/CharValue.java,
* gnu/classpath/jdwp/value/DoubleValue.java,
* gnu/classpath/jdwp/value/FloatValue.java,
* gnu/classpath/jdwp/value/IntValue.java,
* gnu/classpath/jdwp/value/LongValue.java,
* gnu/classpath/jdwp/value/ObjectValue.java,
* gnu/classpath/jdwp/value/ShortValue.java,
* gnu/classpath/jdwp/value/StringValue.java,
* gnu/classpath/jdwp/value/Value.java,
* gnu/classpath/jdwp/value/ValueFactory.java,
* gnu/classpath/jdwp/value/VoidValue.java,
* gnu/classpath/toolkit/DefaultDaemonThreadFactory.java,
* gnu/java/awt/AWTUtilities.java,
* gnu/java/awt/BitMaskExtent.java,
* gnu/java/awt/BitwiseXORComposite.java,
* gnu/java/awt/Buffers.java,
* gnu/java/awt/ClasspathGraphicsEnvironment.java,
* gnu/java/awt/ClasspathToolkit.java,
* gnu/java/awt/ComponentDataBlitOp.java,
* gnu/java/awt/EmbeddedWindow.java,
* gnu/java/awt/GradientPaintContext.java,
* gnu/java/awt/color/CieXyzConverter.java,
* gnu/java/awt/color/ClutProfileConverter.java,
* gnu/java/awt/color/ColorLookUpTable.java,
* gnu/java/awt/color/GrayProfileConverter.java,
* gnu/java/awt/color/GrayScaleConverter.java,
* gnu/java/awt/color/LinearRGBConverter.java,
* gnu/java/awt/color/ProfileHeader.java,
* gnu/java/awt/color/RgbProfileConverter.java,
* gnu/java/awt/color/SrgbConverter.java,
* gnu/java/awt/color/ToneReproductionCurve.java,
* gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java,
* gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java,
* gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java,
* gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java,
* gnu/java/awt/font/FontDelegate.java,
* gnu/java/awt/font/FontFactory.java,
* gnu/java/awt/font/GNUGlyphVector.java,
* gnu/java/awt/font/OpenTypeFontPeer.java,
* gnu/java/awt/font/autofit/GlyphHints.java,
* gnu/java/awt/font/autofit/Latin.java,
* gnu/java/awt/font/autofit/Utils.java,
* gnu/java/awt/font/opentype/CharGlyphMap.java,
* gnu/java/awt/font/opentype/GlyphNamer.java,
* gnu/java/awt/font/opentype/MacResourceFork.java,
* gnu/java/awt/font/opentype/NameDecoder.java,
* gnu/java/awt/font/opentype/OpenTypeFont.java,
* gnu/java/awt/font/opentype/OpenTypeFontFactory.java,
* gnu/java/awt/font/opentype/truetype/GlyphLoader.java,
* gnu/java/awt/font/opentype/truetype/GlyphLocator.java,
* gnu/java/awt/font/opentype/truetype/GlyphMeasurer.java,
* gnu/java/awt/font/opentype/truetype/Point.java,
* gnu/java/awt/font/opentype/truetype/TrueTypeScaler.java,
* gnu/java/awt/font/opentype/truetype/VirtualMachine.java,
* gnu/java/awt/font/opentype/truetype/Zone.java,
* gnu/java/awt/font/opentype/truetype/ZonePathIterator.java,
* gnu/java/awt/image/AsyncImage.java,
* gnu/java/awt/image/ImageConverter.java,
* gnu/java/awt/image/ImageDecoder.java,
* gnu/java/awt/image/XBMDecoder.java,
* gnu/java/awt/java2d/AbstractGraphics2D.java,
* gnu/java/awt/java2d/AlphaCompositeContext.java,
* gnu/java/awt/java2d/CubicSegment.java,
* gnu/java/awt/java2d/LineSegment.java,
* gnu/java/awt/java2d/PixelCoverage.java,
* gnu/java/awt/java2d/QuadSegment.java,
* gnu/java/awt/java2d/RasterGraphics.java,
* gnu/java/awt/java2d/ScanlineConverter.java,
* gnu/java/awt/java2d/ScanlineCoverage.java,
* gnu/java/awt/java2d/Segment.java,
* gnu/java/awt/java2d/TexturePaintContext.java,
* gnu/java/awt/peer/ClasspathDesktopPeer.java,
* gnu/java/awt/peer/ClasspathFontPeer.java,
* gnu/java/awt/peer/GLightweightPeer.java,
* gnu/java/awt/peer/GnomeDesktopPeer.java,
* gnu/java/awt/peer/KDEDesktopPeer.java,
* gnu/java/awt/peer/gtk/AsyncImage.java,
* gnu/java/awt/peer/gtk/BufferedImageGraphics.java,
* gnu/java/awt/peer/gtk/CairoGraphics2D.java,
* gnu/java/awt/peer/gtk/CairoSurface.java,
* gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java,
* gnu/java/awt/peer/gtk/ComponentGraphics.java,
* gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java,
* gnu/java/awt/peer/gtk/FreetypeGlyphVector.java,
* gnu/java/awt/peer/gtk/GdkFontPeer.java,
* gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java,
* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java,
* gnu/java/awt/peer/gtk/GdkPixbufDecoder.java,
* gnu/java/awt/peer/gtk/GdkRobotPeer.java,
* gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java,
* gnu/java/awt/peer/gtk/GtkButtonPeer.java,
* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java,
* gnu/java/awt/peer/gtk/GtkChoicePeer.java,
* gnu/java/awt/peer/gtk/GtkClipboard.java,
* gnu/java/awt/peer/gtk/GtkComponentPeer.java,
* gnu/java/awt/peer/gtk/GtkContainerPeer.java,
* gnu/java/awt/peer/gtk/GtkCursor.java,
* gnu/java/awt/peer/gtk/GtkDialogPeer.java,
* gnu/java/awt/peer/gtk/GtkFileDialogPeer.java,
* gnu/java/awt/peer/gtk/GtkFramePeer.java,
* gnu/java/awt/peer/gtk/GtkGenericPeer.java,
* gnu/java/awt/peer/gtk/GtkImage.java,
* gnu/java/awt/peer/gtk/GtkImageConsumer.java,
* gnu/java/awt/peer/gtk/GtkLabelPeer.java,
* gnu/java/awt/peer/gtk/GtkListPeer.java,
* gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java,
* gnu/java/awt/peer/gtk/GtkMenuPeer.java,
* gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java,
* gnu/java/awt/peer/gtk/GtkPanelPeer.java,
* gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java,
* gnu/java/awt/peer/gtk/GtkScrollbarPeer.java,
* gnu/java/awt/peer/gtk/GtkSelection.java,
* gnu/java/awt/peer/gtk/GtkToolkit.java,
* gnu/java/awt/peer/gtk/GtkVolatileImage.java,
* gnu/java/awt/peer/gtk/GtkWindowPeer.java,
* gnu/java/awt/peer/gtk/VolatileImageGraphics.java,
* gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.java,
* gnu/java/awt/peer/qt/MainQtThread.java,
* gnu/java/awt/peer/qt/QMatrix.java,
* gnu/java/awt/peer/qt/QPainterPath.java,
* gnu/java/awt/peer/qt/QPen.java,
* gnu/java/awt/peer/qt/QtAudioClip.java,
* gnu/java/awt/peer/qt/QtButtonPeer.java,
* gnu/java/awt/peer/qt/QtCheckboxPeer.java,
* gnu/java/awt/peer/qt/QtChoicePeer.java,
* gnu/java/awt/peer/qt/QtComponentGraphics.java,
* gnu/java/awt/peer/qt/QtComponentPeer.java,
* gnu/java/awt/peer/qt/QtContainerPeer.java,
* gnu/java/awt/peer/qt/QtDialogPeer.java,
* gnu/java/awt/peer/qt/QtEmbeddedWindowPeer.java,
* gnu/java/awt/peer/qt/QtFileDialogPeer.java,
* gnu/java/awt/peer/qt/QtFontMetrics.java,
* gnu/java/awt/peer/qt/QtFontPeer.java,
* gnu/java/awt/peer/qt/QtFramePeer.java,
* gnu/java/awt/peer/qt/QtGraphics.java,
* gnu/java/awt/peer/qt/QtGraphicsEnvironment.java,
* gnu/java/awt/peer/qt/QtImage.java,
* gnu/java/awt/peer/qt/QtImageConsumer.java,
* gnu/java/awt/peer/qt/QtImageDirectGraphics.java,
* gnu/java/awt/peer/qt/QtImageGraphics.java,
* gnu/java/awt/peer/qt/QtLabelPeer.java,
* gnu/java/awt/peer/qt/QtListPeer.java,
* gnu/java/awt/peer/qt/QtMenuBarPeer.java,
* gnu/java/awt/peer/qt/QtMenuComponentPeer.java,
* gnu/java/awt/peer/qt/QtMenuItemPeer.java,
* gnu/java/awt/peer/qt/QtMenuPeer.java,
* gnu/java/awt/peer/qt/QtPanelPeer.java,
* gnu/java/awt/peer/qt/QtPopupMenuPeer.java,
* gnu/java/awt/peer/qt/QtRepaintThread.java,
* gnu/java/awt/peer/qt/QtScreenDevice.java,
* gnu/java/awt/peer/qt/QtScreenDeviceConfiguration.java,
* gnu/java/awt/peer/qt/QtScrollPanePeer.java,
* gnu/java/awt/peer/qt/QtScrollbarPeer.java,
* gnu/java/awt/peer/qt/QtTextAreaPeer.java,
* gnu/java/awt/peer/qt/QtTextFieldPeer.java,
* gnu/java/awt/peer/qt/QtToolkit.java,
* gnu/java/awt/peer/qt/QtVolatileImage.java,
* gnu/java/awt/peer/qt/QtWindowPeer.java,
* gnu/java/awt/peer/swing/SwingButtonPeer.java,
* gnu/java/awt/peer/swing/SwingCheckboxPeer.java,
* gnu/java/awt/peer/swing/SwingComponent.java,
* gnu/java/awt/peer/swing/SwingComponentPeer.java,
* gnu/java/awt/peer/swing/SwingContainerPeer.java,
* gnu/java/awt/peer/swing/SwingLabelPeer.java,
* gnu/java/awt/peer/swing/SwingListPeer.java,
* gnu/java/awt/peer/swing/SwingMenuItemPeer.java,
* gnu/java/awt/peer/swing/SwingMenuPeer.java,
* gnu/java/awt/peer/swing/SwingTextAreaPeer.java,
* gnu/java/awt/peer/swing/SwingTextFieldPeer.java,
* gnu/java/awt/peer/x/GLGraphics.java,
* gnu/java/awt/peer/x/KeyboardMapping.java,
* gnu/java/awt/peer/x/XEventPump.java,
* gnu/java/awt/peer/x/XFontPeer.java,
* gnu/java/awt/peer/x/XFramePeer.java,
* gnu/java/awt/peer/x/XGraphics2D.java,
* gnu/java/awt/peer/x/XGraphicsConfiguration.java,
* gnu/java/awt/peer/x/XGraphicsDevice.java,
* gnu/java/awt/peer/x/XGraphicsEnvironment.java,
* gnu/java/awt/peer/x/XImage.java,
* gnu/java/awt/peer/x/XToolkit.java,
* gnu/java/awt/peer/x/XWindowPeer.java,
* gnu/java/awt/print/JavaPrinterGraphics.java,
* gnu/java/awt/print/JavaPrinterJob.java,
* gnu/java/awt/print/PostScriptGraphics2D.java,
* gnu/java/awt/print/SpooledDocument.java,
* gnu/java/beans/BeanInfoEmbryo.java,
* gnu/java/beans/DefaultExceptionListener.java,
* gnu/java/beans/ExplicitBeanInfo.java,
* gnu/java/beans/IntrospectionIncubator.java,
* gnu/java/beans/decoder/AbstractContext.java,
* gnu/java/beans/decoder/AbstractCreatableObjectContext.java,
* gnu/java/beans/decoder/AbstractElementHandler.java,
* gnu/java/beans/decoder/AbstractObjectContext.java,
* gnu/java/beans/decoder/ArrayContext.java,
* gnu/java/beans/decoder/ArrayHandler.java,
* gnu/java/beans/decoder/AssemblyException.java,
* gnu/java/beans/decoder/BooleanHandler.java,
* gnu/java/beans/decoder/ByteHandler.java,
* gnu/java/beans/decoder/CharHandler.java,
* gnu/java/beans/decoder/ClassHandler.java,
* gnu/java/beans/decoder/ConstructorContext.java,
* gnu/java/beans/decoder/Context.java,
* gnu/java/beans/decoder/DecoderContext.java,
* gnu/java/beans/decoder/DoubleHandler.java,
* gnu/java/beans/decoder/DummyContext.java,
* gnu/java/beans/decoder/DummyHandler.java,
* gnu/java/beans/decoder/ElementHandler.java,
* gnu/java/beans/decoder/FloatHandler.java,
* gnu/java/beans/decoder/GrowableArrayContext.java,
* gnu/java/beans/decoder/IndexContext.java,
* gnu/java/beans/decoder/IntHandler.java,
* gnu/java/beans/decoder/JavaHandler.java,
* gnu/java/beans/decoder/LongHandler.java,
* gnu/java/beans/decoder/MethodContext.java,
* gnu/java/beans/decoder/MethodFinder.java,
* gnu/java/beans/decoder/NullHandler.java,
* gnu/java/beans/decoder/ObjectContext.java,
* gnu/java/beans/decoder/ObjectHandler.java,
* gnu/java/beans/decoder/PersistenceParser.java,
* gnu/java/beans/decoder/PropertyContext.java,
* gnu/java/beans/decoder/ShortHandler.java,
* gnu/java/beans/decoder/SimpleHandler.java,
* gnu/java/beans/decoder/StaticMethodContext.java,
* gnu/java/beans/decoder/StringHandler.java,
* gnu/java/beans/decoder/VoidHandler.java,
* gnu/java/beans/editors/ColorEditor.java,
* gnu/java/beans/editors/FontEditor.java,
* gnu/java/beans/editors/NativeBooleanEditor.java,
* gnu/java/beans/editors/NativeByteEditor.java,
* gnu/java/beans/editors/NativeDoubleEditor.java,
* gnu/java/beans/editors/NativeFloatEditor.java,
* gnu/java/beans/editors/NativeIntEditor.java,
* gnu/java/beans/editors/NativeLongEditor.java,
* gnu/java/beans/editors/NativeShortEditor.java,
* gnu/java/beans/editors/StringEditor.java,
* gnu/java/beans/encoder/ArrayPersistenceDelegate.java,
* gnu/java/beans/encoder/ClassPersistenceDelegate.java,
* gnu/java/beans/encoder/CollectionPersistenceDelegate.java,
* gnu/java/beans/encoder/Context.java,
* gnu/java/beans/encoder/GenericScannerState.java,
* gnu/java/beans/encoder/IgnoringScannerState.java,
* gnu/java/beans/encoder/MapPersistenceDelegate.java,
* gnu/java/beans/encoder/ObjectId.java,
* gnu/java/beans/encoder/PrimitivePersistenceDelegate.java,
* gnu/java/beans/encoder/ReportingScannerState.java,
* gnu/java/beans/encoder/Root.java,
* gnu/java/beans/encoder/ScanEngine.java,
* gnu/java/beans/encoder/ScannerState.java,
* gnu/java/beans/encoder/StAXWriter.java,
* gnu/java/beans/encoder/Writer.java,
* gnu/java/beans/encoder/elements/ArrayInstantiation.java,
* gnu/java/beans/encoder/elements/Array_Get.java,
* gnu/java/beans/encoder/elements/ClassResolution.java,
* gnu/java/beans/encoder/elements/Element.java,
* gnu/java/beans/encoder/elements/List_Get.java,
* gnu/java/beans/encoder/elements/List_Set.java,
* gnu/java/beans/encoder/elements/MethodInvocation.java,
* gnu/java/beans/encoder/elements/NullObject.java,
* gnu/java/beans/encoder/elements/ObjectInstantiation.java,
* gnu/java/beans/encoder/elements/ObjectReference.java,
* gnu/java/beans/encoder/elements/PrimitiveInstantiation.java,
* gnu/java/beans/encoder/elements/StaticFieldAccess.java,
* gnu/java/beans/encoder/elements/StaticMethodInvocation.java,
* gnu/java/beans/encoder/elements/StringReference.java,
* gnu/java/io/ASN1ParsingException.java,
* gnu/java/io/Base64InputStream.java,
* gnu/java/io/ClassLoaderObjectInputStream.java,
* gnu/java/io/NullOutputStream.java,
* gnu/java/io/ObjectIdentityMap2Int.java,
* gnu/java/io/ObjectIdentityWrapper.java,
* gnu/java/io/PlatformHelper.java,
* gnu/java/lang/CPStringBuilder.java,
* gnu/java/lang/CharData.java,
* gnu/java/lang/InstrumentationImpl.java,
* gnu/java/lang/MainThread.java,
* gnu/java/lang/management/BeanImpl.java,
* gnu/java/lang/management/ClassLoadingMXBeanImpl.java,
* gnu/java/lang/management/CompilationMXBeanImpl.java,
* gnu/java/lang/management/GarbageCollectorMXBeanImpl.java,
* gnu/java/lang/management/MemoryMXBeanImpl.java,
* gnu/java/lang/management/MemoryManagerMXBeanImpl.java,
* gnu/java/lang/management/MemoryPoolMXBeanImpl.java,
* gnu/java/lang/management/OperatingSystemMXBeanImpl.java,
* gnu/java/lang/management/RuntimeMXBeanImpl.java,
* gnu/java/lang/management/ThreadMXBeanImpl.java,
* gnu/java/lang/reflect/TypeSignature.java,
* gnu/java/locale/LocaleHelper.java,
* gnu/java/math/Fixed.java,
* gnu/java/math/GMP.java,
* gnu/java/math/MPN.java,
* gnu/java/net/CRLFInputStream.java,
* gnu/java/net/CRLFOutputStream.java,
* gnu/java/net/DefaultContentHandlerFactory.java,
* gnu/java/net/DefaultProxySelector.java,
* gnu/java/net/EmptyX509TrustManager.java,
* gnu/java/net/GetLocalHostAction.java,
* gnu/java/net/HeaderFieldHelper.java,
* gnu/java/net/IndexListParser.java,
* gnu/java/net/LineInputStream.java,
* gnu/java/net/PlainDatagramSocketImpl.java,
* gnu/java/net/PlainSocketImpl.java,
* gnu/java/net/loader/FileResource.java,
* gnu/java/net/loader/FileURLLoader.java,
* gnu/java/net/loader/JarURLLoader.java,
* gnu/java/net/loader/JarURLResource.java,
* gnu/java/net/loader/RemoteResource.java,
* gnu/java/net/loader/RemoteURLLoader.java,
* gnu/java/net/loader/Resource.java,
* gnu/java/net/loader/URLLoader.java,
* gnu/java/net/protocol/file/Connection.java,
* gnu/java/net/protocol/file/Handler.java,
* gnu/java/net/protocol/ftp/ActiveModeDTP.java,
* gnu/java/net/protocol/ftp/BlockInputStream.java,
* gnu/java/net/protocol/ftp/BlockOutputStream.java,
* gnu/java/net/protocol/ftp/CompressedInputStream.java,
* gnu/java/net/protocol/ftp/CompressedOutputStream.java,
* gnu/java/net/protocol/ftp/DTP.java,
* gnu/java/net/protocol/ftp/DTPInputStream.java,
* gnu/java/net/protocol/ftp/DTPOutputStream.java,
* gnu/java/net/protocol/ftp/FTPConnection.java,
* gnu/java/net/protocol/ftp/FTPException.java,
* gnu/java/net/protocol/ftp/FTPResponse.java,
* gnu/java/net/protocol/ftp/FTPURLConnection.java,
* gnu/java/net/protocol/ftp/Handler.java,
* gnu/java/net/protocol/ftp/PassiveModeDTP.java,
* gnu/java/net/protocol/ftp/StreamInputStream.java,
* gnu/java/net/protocol/ftp/StreamOutputStream.java,
* gnu/java/net/protocol/http/Authenticator.java,
* gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java,
* gnu/java/net/protocol/http/ChunkedInputStream.java,
* gnu/java/net/protocol/http/Cookie.java,
* gnu/java/net/protocol/http/CookieManager.java,
* gnu/java/net/protocol/http/Credentials.java,
* gnu/java/net/protocol/http/HTTPConnection.java,
* gnu/java/net/protocol/http/HTTPDateFormat.java,
* gnu/java/net/protocol/http/HTTPURLConnection.java,
* gnu/java/net/protocol/http/Handler.java,
* gnu/java/net/protocol/http/Headers.java,
* gnu/java/net/protocol/http/Request.java,
* gnu/java/net/protocol/http/RequestBodyWriter.java,
* gnu/java/net/protocol/http/Response.java,
* gnu/java/net/protocol/http/ResponseHeaderHandler.java,
* gnu/java/net/protocol/http/SimpleCookieManager.java,
* gnu/java/net/protocol/https/Handler.java,
* gnu/java/net/protocol/jar/Connection.java,
* gnu/java/net/protocol/jar/Handler.java,
* gnu/java/nio/ChannelInputStream.java,
* gnu/java/nio/ChannelOutputStream.java,
* gnu/java/nio/ChannelReader.java,
* gnu/java/nio/ChannelWriter.java,
* gnu/java/nio/DatagramChannelImpl.java,
* gnu/java/nio/DatagramChannelSelectionKey.java,
* gnu/java/nio/EpollSelectionKeyImpl.java,
* gnu/java/nio/EpollSelectorImpl.java,
* gnu/java/nio/FileChannelImpl.java,
* gnu/java/nio/FileLockImpl.java,
* gnu/java/nio/InputStreamChannel.java,
* gnu/java/nio/KqueueSelectionKeyImpl.java,
* gnu/java/nio/KqueueSelectorImpl.java,
* gnu/java/nio/NIODatagramSocket.java,
* gnu/java/nio/NIOServerSocket.java,
* gnu/java/nio/NIOSocket.java,
* gnu/java/nio/NIOSocketImpl.java,
* gnu/java/nio/OutputStreamChannel.java,
* gnu/java/nio/PipeImpl.java,
* gnu/java/nio/SelectionKeyImpl.java,
* gnu/java/nio/SelectorImpl.java,
* gnu/java/nio/SelectorProviderImpl.java,
* gnu/java/nio/ServerSocketChannelImpl.java,
* gnu/java/nio/ServerSocketChannelSelectionKey.java,
* gnu/java/nio/SocketChannelImpl.java,
* gnu/java/nio/SocketChannelSelectionKey.java,
* gnu/java/nio/SocketChannelSelectionKeyImpl.java,
* gnu/java/nio/VMChannelOwner.java,
* gnu/java/nio/charset/ByteCharset.java,
* gnu/java/nio/charset/ByteDecodeLoopHelper.java,
* gnu/java/nio/charset/ByteEncodeLoopHelper.java,
* gnu/java/nio/charset/Cp424.java,
* gnu/java/nio/charset/Cp437.java,
* gnu/java/nio/charset/Cp737.java,
* gnu/java/nio/charset/Cp775.java,
* gnu/java/nio/charset/Cp850.java,
* gnu/java/nio/charset/Cp852.java,
* gnu/java/nio/charset/Cp855.java,
* gnu/java/nio/charset/Cp857.java,
* gnu/java/nio/charset/Cp860.java,
* gnu/java/nio/charset/Cp861.java,
* gnu/java/nio/charset/Cp862.java,
* gnu/java/nio/charset/Cp863.java,
* gnu/java/nio/charset/Cp864.java,
* gnu/java/nio/charset/Cp865.java,
* gnu/java/nio/charset/Cp866.java,
* gnu/java/nio/charset/Cp869.java,
* gnu/java/nio/charset/Cp874.java,
* gnu/java/nio/charset/EncodingHelper.java,
* gnu/java/nio/charset/ISO_8859_1.java,
* gnu/java/nio/charset/ISO_8859_13.java,
* gnu/java/nio/charset/ISO_8859_15.java,
* gnu/java/nio/charset/ISO_8859_2.java,
* gnu/java/nio/charset/ISO_8859_3.java,
* gnu/java/nio/charset/ISO_8859_4.java,
* gnu/java/nio/charset/ISO_8859_5.java,
* gnu/java/nio/charset/ISO_8859_6.java,
* gnu/java/nio/charset/ISO_8859_7.java,
* gnu/java/nio/charset/ISO_8859_8.java,
* gnu/java/nio/charset/ISO_8859_9.java,
* gnu/java/nio/charset/KOI_8.java,
* gnu/java/nio/charset/MS874.java,
* gnu/java/nio/charset/MacCentralEurope.java,
* gnu/java/nio/charset/MacCroatian.java,
* gnu/java/nio/charset/MacCyrillic.java,
* gnu/java/nio/charset/MacDingbat.java,
* gnu/java/nio/charset/MacGreek.java,
* gnu/java/nio/charset/MacIceland.java,
* gnu/java/nio/charset/MacRoman.java,
* gnu/java/nio/charset/MacRomania.java,
* gnu/java/nio/charset/MacSymbol.java,
* gnu/java/nio/charset/MacThai.java,
* gnu/java/nio/charset/MacTurkish.java,
* gnu/java/nio/charset/Provider.java,
* gnu/java/nio/charset/US_ASCII.java,
* gnu/java/nio/charset/UTF_16.java,
* gnu/java/nio/charset/UTF_16BE.java,
* gnu/java/nio/charset/UTF_16Decoder.java,
* gnu/java/nio/charset/UTF_16Encoder.java,
* gnu/java/nio/charset/UTF_16LE.java,
* gnu/java/nio/charset/UTF_8.java,
* gnu/java/nio/charset/UnicodeLittle.java,
* gnu/java/nio/charset/Windows1250.java,
* gnu/java/nio/charset/Windows1251.java,
* gnu/java/nio/charset/Windows1252.java,
* gnu/java/nio/charset/Windows1253.java,
* gnu/java/nio/charset/Windows1254.java,
* gnu/java/nio/charset/Windows1255.java,
* gnu/java/nio/charset/Windows1256.java,
* gnu/java/nio/charset/Windows1257.java,
* gnu/java/nio/charset/Windows1258.java,
* gnu/java/nio/charset/iconv/IconvCharset.java,
* gnu/java/nio/charset/iconv/IconvDecoder.java,
* gnu/java/nio/charset/iconv/IconvEncoder.java,
* gnu/java/nio/charset/iconv/IconvProvider.java,
* gnu/java/rmi/RMIMarshalledObjectInputStream.java,
* gnu/java/rmi/RMIMarshalledObjectOutputStream.java,
* gnu/java/rmi/activation/ActivationSystemTransient.java,
* gnu/java/rmi/activation/BidiTable.java,
* gnu/java/rmi/activation/DefaultActivationGroup.java,
* gnu/java/rmi/activation/DefaultActivationSystem.java,
* gnu/java/rmi/dgc/DGCImpl.java,
* gnu/java/rmi/dgc/DGCImpl_Skel.java,
* gnu/java/rmi/dgc/DGCImpl_Stub.java,
* gnu/java/rmi/dgc/LeaseRenewingTask.java,
* gnu/java/rmi/registry/RegistryImpl.java,
* gnu/java/rmi/registry/RegistryImpl_Skel.java,
* gnu/java/rmi/registry/RegistryImpl_Stub.java,
* gnu/java/rmi/server/ActivatableRef.java,
* gnu/java/rmi/server/ActivatableServerRef.java,
* gnu/java/rmi/server/CombinedClassLoader.java,
* gnu/java/rmi/server/ConnectionRunnerPool.java,
* gnu/java/rmi/server/ProtocolConstants.java,
* gnu/java/rmi/server/RMIClassLoaderImpl.java,
* gnu/java/rmi/server/RMIDefaultSocketFactory.java,
* gnu/java/rmi/server/RMIHashes.java,
* gnu/java/rmi/server/RMIIncomingThread.java,
* gnu/java/rmi/server/RMIObjectInputStream.java,
* gnu/java/rmi/server/RMIObjectOutputStream.java,
* gnu/java/rmi/server/UnicastConnection.java,
* gnu/java/rmi/server/UnicastConnectionManager.java,
* gnu/java/rmi/server/UnicastRef.java,
* gnu/java/rmi/server/UnicastRemoteCall.java,
* gnu/java/rmi/server/UnicastRemoteStub.java,
* gnu/java/rmi/server/UnicastServer.java,
* gnu/java/rmi/server/UnicastServerRef.java,
* gnu/java/security/Engine.java,
* gnu/java/security/OID.java,
* gnu/java/security/PolicyFile.java,
* gnu/java/security/Properties.java,
* gnu/java/security/Registry.java,
* gnu/java/security/Requires.java,
* gnu/java/security/action/GetPropertyAction.java,
* gnu/java/security/action/SetAccessibleAction.java,
* gnu/java/security/der/DERValue.java,
* gnu/java/security/hash/BaseHash.java,
* gnu/java/security/hash/HashFactory.java,
* gnu/java/security/hash/Haval.java,
* gnu/java/security/hash/IMessageDigest.java,
* gnu/java/security/hash/MD2.java,
* gnu/java/security/hash/MD4.java,
* gnu/java/security/hash/MD5.java,
* gnu/java/security/hash/RipeMD128.java,
* gnu/java/security/hash/RipeMD160.java,
* gnu/java/security/hash/Sha160.java,
* gnu/java/security/hash/Sha256.java,
* gnu/java/security/hash/Sha384.java,
* gnu/java/security/hash/Sha512.java,
* gnu/java/security/hash/Tiger.java,
* gnu/java/security/hash/Whirlpool.java,
* gnu/java/security/jce/hash/HavalSpi.java,
* gnu/java/security/jce/hash/MD2Spi.java,
* gnu/java/security/jce/hash/MD4Spi.java,
* gnu/java/security/jce/hash/MD5Spi.java,
* gnu/java/security/jce/hash/MessageDigestAdapter.java,
* gnu/java/security/jce/hash/RipeMD128Spi.java,
* gnu/java/security/jce/hash/RipeMD160Spi.java,
* gnu/java/security/jce/hash/Sha160Spi.java,
* gnu/java/security/jce/hash/Sha256Spi.java,
* gnu/java/security/jce/hash/Sha384Spi.java,
* gnu/java/security/jce/hash/Sha512Spi.java,
* gnu/java/security/jce/hash/TigerSpi.java,
* gnu/java/security/jce/hash/WhirlpoolSpi.java,
* gnu/java/security/jce/prng/HavalRandomSpi.java,
* gnu/java/security/jce/prng/MD2RandomSpi.java,
* gnu/java/security/jce/prng/MD4RandomSpi.java,
* gnu/java/security/jce/prng/MD5RandomSpi.java,
* gnu/java/security/jce/prng/RipeMD128RandomSpi.java,
* gnu/java/security/jce/prng/RipeMD160RandomSpi.java,
* gnu/java/security/jce/prng/SecureRandomAdapter.java,
* gnu/java/security/jce/prng/Sha160RandomSpi.java,
* gnu/java/security/jce/prng/Sha256RandomSpi.java,
* gnu/java/security/jce/prng/Sha384RandomSpi.java,
* gnu/java/security/jce/prng/Sha512RandomSpi.java,
* gnu/java/security/jce/prng/TigerRandomSpi.java,
* gnu/java/security/jce/prng/WhirlpoolRandomSpi.java,
* gnu/java/security/jce/sig/DSSKeyFactory.java,
* gnu/java/security/jce/sig/DSSKeyPairGeneratorSpi.java,
* gnu/java/security/jce/sig/DSSParameters.java,
* gnu/java/security/jce/sig/DSSRawSignatureSpi.java,
* gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java,
* gnu/java/security/jce/sig/RSAPSSRawSignatureSpi.java,
* gnu/java/security/jce/sig/SignatureAdapter.java,
* gnu/java/security/key/IKeyPairCodec.java,
* gnu/java/security/key/IKeyPairGenerator.java,
* gnu/java/security/key/KeyPairCodecFactory.java,
* gnu/java/security/key/KeyPairGeneratorFactory.java,
* gnu/java/security/key/dss/DSSKey.java,
* gnu/java/security/key/dss/DSSKeyPairGenerator.java,
* gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java,
* gnu/java/security/key/dss/DSSKeyPairRawCodec.java,
* gnu/java/security/key/dss/DSSKeyPairX509Codec.java,
* gnu/java/security/key/dss/DSSPrivateKey.java,
* gnu/java/security/key/dss/DSSPublicKey.java,
* gnu/java/security/key/dss/FIPS186.java,
* gnu/java/security/key/rsa/GnuRSAKey.java,
* gnu/java/security/key/rsa/GnuRSAPrivateKey.java,
* gnu/java/security/key/rsa/GnuRSAPublicKey.java,
* gnu/java/security/key/rsa/RSAKeyPairGenerator.java,
* gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java,
* gnu/java/security/key/rsa/RSAKeyPairRawCodec.java,
* gnu/java/security/key/rsa/RSAKeyPairX509Codec.java,
* gnu/java/security/pkcs/PKCS7Data.java,
* gnu/java/security/pkcs/PKCS7SignedData.java,
* gnu/java/security/pkcs/SignerInfo.java,
* gnu/java/security/prng/BasePRNG.java,
* gnu/java/security/prng/EntropySource.java,
* gnu/java/security/prng/IRandom.java,
* gnu/java/security/prng/LimitReachedException.java,
* gnu/java/security/prng/MDGenerator.java,
* gnu/java/security/prng/PRNGFactory.java,
* gnu/java/security/prng/RandomEventListener.java,
* gnu/java/security/provider/DefaultPolicy.java,
* gnu/java/security/provider/PKIXCertPathValidatorImpl.java,
* gnu/java/security/sig/BaseSignature.java,
* gnu/java/security/sig/ISignature.java,
* gnu/java/security/sig/ISignatureCodec.java,
* gnu/java/security/sig/SignatureCodecFactory.java,
* gnu/java/security/sig/SignatureFactory.java,
* gnu/java/security/sig/dss/DSSSignature.java,
* gnu/java/security/sig/dss/DSSSignatureRawCodec.java,
* gnu/java/security/sig/dss/DSSSignatureX509Codec.java,
* gnu/java/security/sig/rsa/EME_PKCS1_V1_5.java,
* gnu/java/security/sig/rsa/EMSA_PKCS1_V1_5.java,
* gnu/java/security/sig/rsa/EMSA_PSS.java,
* gnu/java/security/sig/rsa/RSA.java,
* gnu/java/security/sig/rsa/RSAPKCS1V1_5Signature.java,
* gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureRawCodec.java,
* gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureX509Codec.java,
* gnu/java/security/sig/rsa/RSAPSSSignature.java,
* gnu/java/security/sig/rsa/RSAPSSSignatureRawCodec.java,
* gnu/java/security/sig/rsa/RSASignatureFactory.java,
* gnu/java/security/util/ByteArray.java,
* gnu/java/security/util/ByteBufferOutputStream.java,
* gnu/java/security/util/ExpirableObject.java,
* gnu/java/security/util/FormatUtil.java,
* gnu/java/security/util/IntegerUtil.java,
* gnu/java/security/util/PRNG.java,
* gnu/java/security/util/Prime.java,
* gnu/java/security/util/Sequence.java,
* gnu/java/security/util/SimpleList.java,
* gnu/java/security/util/Util.java,
* gnu/java/security/x509/X509CRLSelectorImpl.java,
* gnu/java/security/x509/X509CertSelectorImpl.java,
* gnu/java/security/x509/ext/CertificatePolicies.java,
* gnu/java/security/x509/ext/GeneralName.java,
* gnu/java/security/x509/ext/GeneralSubtree.java,
* gnu/java/security/x509/ext/NameConstraints.java,
* gnu/java/text/AttributedFormatBuffer.java,
* gnu/java/text/BaseBreakIterator.java,
* gnu/java/text/CharacterBreakIterator.java,
* gnu/java/text/FormatBuffer.java,
* gnu/java/text/FormatCharacterIterator.java,
* gnu/java/text/LineBreakIterator.java,
* gnu/java/text/SentenceBreakIterator.java,
* gnu/java/text/StringFormatBuffer.java,
* gnu/java/text/WordBreakIterator.java,
* gnu/java/util/Base64.java,
* gnu/java/util/DoubleEnumeration.java,
* gnu/java/util/EmptyEnumeration.java,
* gnu/java/util/WeakIdentityHashMap.java,
* gnu/java/util/ZoneInfo.java,
* gnu/java/util/jar/JarUtils.java,
* gnu/java/util/prefs/FileBasedFactory.java,
* gnu/java/util/prefs/FileBasedPreferences.java,
* gnu/java/util/prefs/GConfBasedFactory.java,
* gnu/java/util/prefs/GConfBasedPreferences.java,
* gnu/java/util/prefs/MemoryBasedFactory.java,
* gnu/java/util/prefs/MemoryBasedPreferences.java,
* gnu/java/util/prefs/NodeReader.java,
* gnu/java/util/prefs/NodeWriter.java,
* gnu/java/util/prefs/gconf/GConfNativePeer.java,
* gnu/java/util/regex/BacktrackStack.java,
* gnu/java/util/regex/CharIndexed.java,
* gnu/java/util/regex/CharIndexedInputStream.java,
* gnu/java/util/regex/RE.java,
* gnu/java/util/regex/REFilterInputStream.java,
* gnu/java/util/regex/REMatch.java,
* gnu/java/util/regex/REMatchEnumeration.java,
* gnu/java/util/regex/RESyntax.java,
* gnu/java/util/regex/REToken.java,
* gnu/java/util/regex/RETokenAny.java,
* gnu/java/util/regex/RETokenBackRef.java,
* gnu/java/util/regex/RETokenChar.java,
* gnu/java/util/regex/RETokenEnd.java,
* gnu/java/util/regex/RETokenEndOfPreviousMatch.java,
* gnu/java/util/regex/RETokenIndependent.java,
* gnu/java/util/regex/RETokenLookAhead.java,
* gnu/java/util/regex/RETokenLookBehind.java,
* gnu/java/util/regex/RETokenNamedProperty.java,
* gnu/java/util/regex/RETokenOneOf.java,
* gnu/java/util/regex/RETokenPOSIX.java,
* gnu/java/util/regex/RETokenRange.java,
* gnu/java/util/regex/RETokenRepeated.java,
* gnu/java/util/regex/RETokenStart.java,
* gnu/java/util/regex/RETokenWordBoundary.java,
* gnu/java/util/regex/UncheckedRE.java,
* gnu/javax/activation/viewers/ImageViewer.java,
* gnu/javax/activation/viewers/TextEditor.java,
* gnu/javax/activation/viewers/TextViewer.java,
* gnu/javax/crypto/assembly/Assembly.java,
* gnu/javax/crypto/assembly/Cascade.java,
* gnu/javax/crypto/assembly/CascadeStage.java,
* gnu/javax/crypto/assembly/CascadeTransformer.java,
* gnu/javax/crypto/assembly/DeflateTransformer.java,
* gnu/javax/crypto/assembly/Direction.java,
* gnu/javax/crypto/assembly/LoopbackTransformer.java,
* gnu/javax/crypto/assembly/ModeStage.java,
* gnu/javax/crypto/assembly/Operation.java,
* gnu/javax/crypto/assembly/PaddingTransformer.java,
* gnu/javax/crypto/assembly/Stage.java,
* gnu/javax/crypto/assembly/Transformer.java,
* gnu/javax/crypto/assembly/TransformerException.java,
* gnu/javax/crypto/cipher/Anubis.java,
* gnu/javax/crypto/cipher/BaseCipher.java,
* gnu/javax/crypto/cipher/Blowfish.java,
* gnu/javax/crypto/cipher/Cast5.java,
* gnu/javax/crypto/cipher/CipherFactory.java,
* gnu/javax/crypto/cipher/DES.java,
* gnu/javax/crypto/cipher/IBlockCipher.java,
* gnu/javax/crypto/cipher/IBlockCipherSpi.java,
* gnu/javax/crypto/cipher/Khazad.java,
* gnu/javax/crypto/cipher/NullCipher.java,
* gnu/javax/crypto/cipher/Rijndael.java,
* gnu/javax/crypto/cipher/Serpent.java,
* gnu/javax/crypto/cipher/Square.java,
* gnu/javax/crypto/cipher/TripleDES.java,
* gnu/javax/crypto/cipher/Twofish.java,
* gnu/javax/crypto/cipher/WeakKeyException.java,
* gnu/javax/crypto/jce/DiffieHellmanImpl.java,
* gnu/javax/crypto/jce/GnuCrypto.java,
* gnu/javax/crypto/jce/GnuSasl.java,
* gnu/javax/crypto/jce/PBKDF2SecretKeyFactory.java,
* gnu/javax/crypto/jce/cipher/AESKeyWrapSpi.java,
* gnu/javax/crypto/jce/cipher/AESSpi.java,
* gnu/javax/crypto/jce/cipher/ARCFourSpi.java,
* gnu/javax/crypto/jce/cipher/AnubisSpi.java,
* gnu/javax/crypto/jce/cipher/BlowfishSpi.java,
* gnu/javax/crypto/jce/cipher/Cast5Spi.java,
* gnu/javax/crypto/jce/cipher/CipherAdapter.java,
* gnu/javax/crypto/jce/cipher/DESSpi.java,
* gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java,
* gnu/javax/crypto/jce/cipher/KhazadSpi.java,
* gnu/javax/crypto/jce/cipher/NullCipherSpi.java,
* gnu/javax/crypto/jce/cipher/PBES2.java,
* gnu/javax/crypto/jce/cipher/RijndaelSpi.java,
* gnu/javax/crypto/jce/cipher/SerpentSpi.java,
* gnu/javax/crypto/jce/cipher/SquareSpi.java,
* gnu/javax/crypto/jce/cipher/TripleDESSpi.java,
* gnu/javax/crypto/jce/cipher/TwofishSpi.java,
* gnu/javax/crypto/jce/key/AnubisSecretKeyFactoryImpl.java,
* gnu/javax/crypto/jce/key/BlowfishSecretKeyFactoryImpl.java,
* gnu/javax/crypto/jce/key/Cast5SecretKeyFactoryImpl.java,
* gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.java,
* gnu/javax/crypto/jce/keyring/GnuKeyring.java,
* gnu/javax/crypto/jce/mac/HMacHavalSpi.java,
* gnu/javax/crypto/jce/mac/HMacMD2Spi.java,
* gnu/javax/crypto/jce/mac/HMacMD4Spi.java,
* gnu/javax/crypto/jce/mac/HMacMD5Spi.java,
* gnu/javax/crypto/jce/mac/HMacRipeMD128Spi.java,
* gnu/javax/crypto/jce/mac/HMacRipeMD160Spi.java,
* gnu/javax/crypto/jce/mac/HMacSHA160Spi.java,
* gnu/javax/crypto/jce/mac/HMacSHA256Spi.java,
* gnu/javax/crypto/jce/mac/HMacSHA384Spi.java,
* gnu/javax/crypto/jce/mac/HMacSHA512Spi.java,
* gnu/javax/crypto/jce/mac/HMacTigerSpi.java,
* gnu/javax/crypto/jce/mac/HMacWhirlpoolSpi.java,
* gnu/javax/crypto/jce/mac/MacAdapter.java,
* gnu/javax/crypto/jce/mac/TMMH16Spi.java,
* gnu/javax/crypto/jce/mac/UHash32Spi.java,
* gnu/javax/crypto/jce/mac/UMac32Spi.java,
* gnu/javax/crypto/jce/params/BlockCipherParameters.java,
* gnu/javax/crypto/jce/params/DEREncodingException.java,
* gnu/javax/crypto/jce/params/DERReader.java,
* gnu/javax/crypto/jce/params/DERWriter.java,
* gnu/javax/crypto/jce/prng/ARCFourRandomSpi.java,
* gnu/javax/crypto/jce/prng/CSPRNGSpi.java,
* gnu/javax/crypto/jce/prng/FortunaImpl.java,
* gnu/javax/crypto/jce/prng/ICMRandomSpi.java,
* gnu/javax/crypto/jce/prng/UMacRandomSpi.java,
* gnu/javax/crypto/jce/sig/DHParameters.java,
* gnu/javax/crypto/jce/spec/BlockCipherParameterSpec.java,
* gnu/javax/crypto/jce/spec/TMMHParameterSpec.java,
* gnu/javax/crypto/jce/spec/UMac32ParameterSpec.java,
* gnu/javax/crypto/key/BaseKeyAgreementParty.java,
* gnu/javax/crypto/key/GnuPBEKey.java,
* gnu/javax/crypto/key/GnuSecretKey.java,
* gnu/javax/crypto/key/IKeyAgreementParty.java,
* gnu/javax/crypto/key/IncomingMessage.java,
* gnu/javax/crypto/key/KeyAgreementException.java,
* gnu/javax/crypto/key/KeyAgreementFactory.java,
* gnu/javax/crypto/key/OutgoingMessage.java,
* gnu/javax/crypto/key/dh/DHKeyPairPKCS8Codec.java,
* gnu/javax/crypto/key/dh/DHKeyPairRawCodec.java,
* gnu/javax/crypto/key/dh/DHKeyPairX509Codec.java,
* gnu/javax/crypto/key/dh/DiffieHellmanKeyAgreement.java,
* gnu/javax/crypto/key/dh/DiffieHellmanReceiver.java,
* gnu/javax/crypto/key/dh/DiffieHellmanSender.java,
* gnu/javax/crypto/key/dh/ElGamalKeyAgreement.java,
* gnu/javax/crypto/key/dh/ElGamalReceiver.java,
* gnu/javax/crypto/key/dh/ElGamalSender.java,
* gnu/javax/crypto/key/dh/GnuDHKey.java,
* gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java,
* gnu/javax/crypto/key/dh/GnuDHPrivateKey.java,
* gnu/javax/crypto/key/dh/GnuDHPublicKey.java,
* gnu/javax/crypto/key/dh/RFC2631.java,
* gnu/javax/crypto/key/srp6/SRP6Host.java,
* gnu/javax/crypto/key/srp6/SRP6KeyAgreement.java,
* gnu/javax/crypto/key/srp6/SRP6SaslClient.java,
* gnu/javax/crypto/key/srp6/SRP6SaslServer.java,
* gnu/javax/crypto/key/srp6/SRP6TLSClient.java,
* gnu/javax/crypto/key/srp6/SRP6TLSServer.java,
* gnu/javax/crypto/key/srp6/SRP6User.java,
* gnu/javax/crypto/key/srp6/SRPAlgorithm.java,
* gnu/javax/crypto/key/srp6/SRPKey.java,
* gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java,
* gnu/javax/crypto/key/srp6/SRPKeyPairRawCodec.java,
* gnu/javax/crypto/key/srp6/SRPPrivateKey.java,
* gnu/javax/crypto/key/srp6/SRPPublicKey.java,
* gnu/javax/crypto/keyring/AuthenticatedEntry.java,
* gnu/javax/crypto/keyring/BaseKeyring.java,
* gnu/javax/crypto/keyring/BinaryDataEntry.java,
* gnu/javax/crypto/keyring/CertPathEntry.java,
* gnu/javax/crypto/keyring/CertificateEntry.java,
* gnu/javax/crypto/keyring/CompressedEntry.java,
* gnu/javax/crypto/keyring/EncryptedEntry.java,
* gnu/javax/crypto/keyring/Entry.java,
* gnu/javax/crypto/keyring/EnvelopeEntry.java,
* gnu/javax/crypto/keyring/GnuPrivateKeyring.java,
* gnu/javax/crypto/keyring/GnuPublicKeyring.java,
* gnu/javax/crypto/keyring/IKeyring.java,
* gnu/javax/crypto/keyring/IPrivateKeyring.java,
* gnu/javax/crypto/keyring/IPublicKeyring.java,
* gnu/javax/crypto/keyring/MalformedKeyringException.java,
* gnu/javax/crypto/keyring/MaskableEnvelopeEntry.java,
* gnu/javax/crypto/keyring/MeteredInputStream.java,
* gnu/javax/crypto/keyring/PasswordAuthenticatedEntry.java,
* gnu/javax/crypto/keyring/PasswordEncryptedEntry.java,
* gnu/javax/crypto/keyring/PasswordProtectedEntry.java,
* gnu/javax/crypto/keyring/PrimitiveEntry.java,
* gnu/javax/crypto/keyring/PrivateKeyEntry.java,
* gnu/javax/crypto/keyring/Properties.java,
* gnu/javax/crypto/keyring/PublicKeyEntry.java,
* gnu/javax/crypto/kwa/BaseKeyWrappingAlgorithm.java,
* gnu/javax/crypto/kwa/IKeyWrappingAlgorithm.java,
* gnu/javax/crypto/kwa/KeyWrappingAlgorithmFactory.java,
* gnu/javax/crypto/kwa/TripleDESKeyWrap.java,
* gnu/javax/crypto/mac/BaseMac.java,
* gnu/javax/crypto/mac/HMac.java,
* gnu/javax/crypto/mac/HMacFactory.java,
* gnu/javax/crypto/mac/IMac.java,
* gnu/javax/crypto/mac/MacFactory.java,
* gnu/javax/crypto/mac/MacInputStream.java,
* gnu/javax/crypto/mac/MacOutputStream.java,
* gnu/javax/crypto/mac/OMAC.java,
* gnu/javax/crypto/mac/TMMH16.java,
* gnu/javax/crypto/mac/UHash32.java,
* gnu/javax/crypto/mac/UMac32.java,
* gnu/javax/crypto/mode/BaseMode.java,
* gnu/javax/crypto/mode/CBC.java,
* gnu/javax/crypto/mode/CFB.java,
* gnu/javax/crypto/mode/CTR.java,
* gnu/javax/crypto/mode/EAX.java,
* gnu/javax/crypto/mode/ECB.java,
* gnu/javax/crypto/mode/IAuthenticatedMode.java,
* gnu/javax/crypto/mode/ICM.java,
* gnu/javax/crypto/mode/IMode.java,
* gnu/javax/crypto/mode/ModeFactory.java,
* gnu/javax/crypto/mode/OFB.java,
* gnu/javax/crypto/pad/BasePad.java,
* gnu/javax/crypto/pad/IPad.java,
* gnu/javax/crypto/pad/PKCS1_V1_5.java,
* gnu/javax/crypto/pad/PKCS7.java,
* gnu/javax/crypto/pad/PadFactory.java,
* gnu/javax/crypto/pad/TBC.java,
* gnu/javax/crypto/pad/WrongPaddingException.java,
* gnu/javax/crypto/prng/ARCFour.java,
* gnu/javax/crypto/prng/CSPRNG.java,
* gnu/javax/crypto/prng/ICMGenerator.java,
* gnu/javax/crypto/prng/IPBE.java,
* gnu/javax/crypto/prng/PBKDF2.java,
* gnu/javax/crypto/prng/PRNGFactory.java,
* gnu/javax/crypto/prng/UMacGenerator.java,
* gnu/javax/crypto/sasl/AuthInfo.java,
* gnu/javax/crypto/sasl/AuthInfoProviderFactory.java,
* gnu/javax/crypto/sasl/ClientFactory.java,
* gnu/javax/crypto/sasl/ClientMechanism.java,
* gnu/javax/crypto/sasl/ConfidentialityException.java,
* gnu/javax/crypto/sasl/IAuthInfoProvider.java,
* gnu/javax/crypto/sasl/IAuthInfoProviderFactory.java,
* gnu/javax/crypto/sasl/IllegalMechanismStateException.java,
* gnu/javax/crypto/sasl/InputBuffer.java,
* gnu/javax/crypto/sasl/IntegrityException.java,
* gnu/javax/crypto/sasl/NoSuchMechanismException.java,
* gnu/javax/crypto/sasl/NoSuchUserException.java,
* gnu/javax/crypto/sasl/OutputBuffer.java,
* gnu/javax/crypto/sasl/SaslEncodingException.java,
* gnu/javax/crypto/sasl/SaslInputStream.java,
* gnu/javax/crypto/sasl/SaslOutputStream.java,
* gnu/javax/crypto/sasl/SaslUtil.java,
* gnu/javax/crypto/sasl/ServerFactory.java,
* gnu/javax/crypto/sasl/ServerMechanism.java,
* gnu/javax/crypto/sasl/UserAlreadyExistsException.java,
* gnu/javax/crypto/sasl/anonymous/AnonymousClient.java,
* gnu/javax/crypto/sasl/anonymous/AnonymousServer.java,
* gnu/javax/crypto/sasl/anonymous/AnonymousUtil.java,
* gnu/javax/crypto/sasl/crammd5/CramMD5AuthInfoProvider.java,
* gnu/javax/crypto/sasl/crammd5/CramMD5Client.java,
* gnu/javax/crypto/sasl/crammd5/CramMD5Registry.java,
* gnu/javax/crypto/sasl/crammd5/CramMD5Server.java,
* gnu/javax/crypto/sasl/crammd5/CramMD5Util.java,
* gnu/javax/crypto/sasl/crammd5/PasswordFile.java,
* gnu/javax/crypto/sasl/plain/PasswordFile.java,
* gnu/javax/crypto/sasl/plain/PlainAuthInfoProvider.java,
* gnu/javax/crypto/sasl/plain/PlainClient.java,
* gnu/javax/crypto/sasl/plain/PlainRegistry.java,
* gnu/javax/crypto/sasl/plain/PlainServer.java,
* gnu/javax/crypto/sasl/srp/CALG.java,
* gnu/javax/crypto/sasl/srp/ClientStore.java,
* gnu/javax/crypto/sasl/srp/IALG.java,
* gnu/javax/crypto/sasl/srp/KDF.java,
* gnu/javax/crypto/sasl/srp/PasswordFile.java,
* gnu/javax/crypto/sasl/srp/SRP.java,
* gnu/javax/crypto/sasl/srp/SRPAuthInfoProvider.java,
* gnu/javax/crypto/sasl/srp/SRPClient.java,
* gnu/javax/crypto/sasl/srp/SRPRegistry.java,
* gnu/javax/crypto/sasl/srp/SRPServer.java,
* gnu/javax/crypto/sasl/srp/SecurityContext.java,
* gnu/javax/crypto/sasl/srp/ServerStore.java,
* gnu/javax/crypto/sasl/srp/StoreEntry.java,
* gnu/javax/imageio/IIOInputStream.java,
* gnu/javax/imageio/bmp/BMPDecoder.java,
* gnu/javax/imageio/bmp/BMPEncoder.java,
* gnu/javax/imageio/bmp/BMPException.java,
* gnu/javax/imageio/bmp/BMPFileHeader.java,
* gnu/javax/imageio/bmp/BMPImageReader.java,
* gnu/javax/imageio/bmp/BMPImageReaderSpi.java,
* gnu/javax/imageio/bmp/BMPImageWriter.java,
* gnu/javax/imageio/bmp/BMPImageWriterSpi.java,
* gnu/javax/imageio/bmp/BMPInfoHeader.java,
* gnu/javax/imageio/bmp/DecodeBF16.java,
* gnu/javax/imageio/bmp/DecodeBF32.java,
* gnu/javax/imageio/bmp/DecodeRGB1.java,
* gnu/javax/imageio/bmp/DecodeRGB24.java,
* gnu/javax/imageio/bmp/DecodeRGB4.java,
* gnu/javax/imageio/bmp/DecodeRGB8.java,
* gnu/javax/imageio/bmp/DecodeRLE4.java,
* gnu/javax/imageio/bmp/DecodeRLE8.java,
* gnu/javax/imageio/bmp/EncodeRGB1.java,
* gnu/javax/imageio/bmp/EncodeRGB16.java,
* gnu/javax/imageio/bmp/EncodeRGB24.java,
* gnu/javax/imageio/bmp/EncodeRGB32.java,
* gnu/javax/imageio/bmp/EncodeRGB4.java,
* gnu/javax/imageio/bmp/EncodeRGB8.java,
* gnu/javax/imageio/bmp/EncodeRLE4.java,
* gnu/javax/imageio/bmp/EncodeRLE8.java,
* gnu/javax/imageio/gif/GIFFile.java,
* gnu/javax/imageio/gif/GIFImageReader.java,
* gnu/javax/imageio/gif/GIFImageReaderSpi.java,
* gnu/javax/imageio/jpeg/DCT.java,
* gnu/javax/imageio/jpeg/JPEGComponent.java,
* gnu/javax/imageio/jpeg/JPEGDecoder.java,
* gnu/javax/imageio/jpeg/JPEGImageInputStream.java,
* gnu/javax/imageio/jpeg/JPEGImageReader.java,
* gnu/javax/imageio/jpeg/JPEGImageReaderSpi.java,
* gnu/javax/imageio/jpeg/JPEGMarker.java,
* gnu/javax/imageio/jpeg/ZigZag.java,
* gnu/javax/imageio/png/PNGChunk.java,
* gnu/javax/imageio/png/PNGData.java,
* gnu/javax/imageio/png/PNGDecoder.java,
* gnu/javax/imageio/png/PNGEncoder.java,
* gnu/javax/imageio/png/PNGException.java,
* gnu/javax/imageio/png/PNGFile.java,
* gnu/javax/imageio/png/PNGFilter.java,
* gnu/javax/imageio/png/PNGGamma.java,
* gnu/javax/imageio/png/PNGHeader.java,
* gnu/javax/imageio/png/PNGICCProfile.java,
* gnu/javax/imageio/png/PNGImageReader.java,
* gnu/javax/imageio/png/PNGPalette.java,
* gnu/javax/imageio/png/PNGPhys.java,
* gnu/javax/imageio/png/PNGTime.java,
* gnu/javax/management/ListenerData.java,
* gnu/javax/management/Server.java,
* gnu/javax/management/Translator.java,
* gnu/javax/naming/giop/ContextContinuation.java,
* gnu/javax/naming/giop/CorbalocParser.java,
* gnu/javax/naming/giop/GiopNamingEnumeration.java,
* gnu/javax/naming/giop/GiopNamingServiceFactory.java,
* gnu/javax/naming/giop/GiopNamingServiceURLContext.java,
* gnu/javax/naming/giop/ListBindingsEnumeration.java,
* gnu/javax/naming/giop/ListEnumeration.java,
* gnu/javax/naming/ictxImpl/trans/GnuName.java,
* gnu/javax/naming/jndi/url/corbaname/corbanameURLContextFactory.java,
* gnu/javax/naming/jndi/url/rmi/ContextContinuation.java,
* gnu/javax/naming/jndi/url/rmi/ListBindingsEnumeration.java,
* gnu/javax/naming/jndi/url/rmi/ListEnumeration.java,
* gnu/javax/naming/jndi/url/rmi/RmiContinuation.java,
* gnu/javax/naming/jndi/url/rmi/RmiNamingEnumeration.java,
* gnu/javax/naming/jndi/url/rmi/rmiURLContext.java,
* gnu/javax/naming/jndi/url/rmi/rmiURLContextFactory.java,
* gnu/javax/net/ssl/AbstractSessionContext.java,
* gnu/javax/net/ssl/PreSharedKeyManager.java,
* gnu/javax/net/ssl/PreSharedKeyManagerParameters.java,
* gnu/javax/net/ssl/SSLCipherSuite.java,
* gnu/javax/net/ssl/SSLRecordHandler.java,
* gnu/javax/net/ssl/Session.java,
* gnu/javax/net/ssl/SessionStoreException.java,
* gnu/javax/net/ssl/provider/AbstractHandshake.java,
* gnu/javax/net/ssl/provider/Alert.java,
* gnu/javax/net/ssl/provider/AlertException.java,
* gnu/javax/net/ssl/provider/Builder.java,
* gnu/javax/net/ssl/provider/Certificate.java,
* gnu/javax/net/ssl/provider/CertificateBuilder.java,
* gnu/javax/net/ssl/provider/CertificateRequest.java,
* gnu/javax/net/ssl/provider/CertificateRequestBuilder.java,
* gnu/javax/net/ssl/provider/CertificateStatusRequest.java,
* gnu/javax/net/ssl/provider/CertificateStatusType.java,
* gnu/javax/net/ssl/provider/CertificateURL.java,
* gnu/javax/net/ssl/provider/CertificateVerify.java,
* gnu/javax/net/ssl/provider/CipherSuite.java,
* gnu/javax/net/ssl/provider/CipherSuiteList.java,
* gnu/javax/net/ssl/provider/ClientCertificateTypeList.java,
* gnu/javax/net/ssl/provider/ClientDHE_PSKParameters.java,
* gnu/javax/net/ssl/provider/ClientDiffieHellmanPublic.java,
* gnu/javax/net/ssl/provider/ClientHandshake.java,
* gnu/javax/net/ssl/provider/ClientHello.java,
* gnu/javax/net/ssl/provider/ClientHelloBuilder.java,
* gnu/javax/net/ssl/provider/ClientHelloV2.java,
* gnu/javax/net/ssl/provider/ClientKeyExchangeBuilder.java,
* gnu/javax/net/ssl/provider/ClientPSKParameters.java,
* gnu/javax/net/ssl/provider/ClientRSA_PSKParameters.java,
* gnu/javax/net/ssl/provider/CompressionMethod.java,
* gnu/javax/net/ssl/provider/CompressionMethodList.java,
* gnu/javax/net/ssl/provider/Constructed.java,
* gnu/javax/net/ssl/provider/Debug.java,
* gnu/javax/net/ssl/provider/DelegatedTask.java,
* gnu/javax/net/ssl/provider/EmptyExchangeKeys.java,
* gnu/javax/net/ssl/provider/EncryptedPreMasterSecret.java,
* gnu/javax/net/ssl/provider/ExchangeKeys.java,
* gnu/javax/net/ssl/provider/Extension.java,
* gnu/javax/net/ssl/provider/ExtensionList.java,
* gnu/javax/net/ssl/provider/Handshake.java,
* gnu/javax/net/ssl/provider/InputSecurityParameters.java,
* gnu/javax/net/ssl/provider/Jessie.java,
* gnu/javax/net/ssl/provider/MaxFragmentLength.java,
* gnu/javax/net/ssl/provider/OutputSecurityParameters.java,
* gnu/javax/net/ssl/provider/PreSharedKeyManagerFactoryImpl.java,
* gnu/javax/net/ssl/provider/Random.java,
* gnu/javax/net/ssl/provider/SSLContextImpl.java,
* gnu/javax/net/ssl/provider/SSLEngineImpl.java,
* gnu/javax/net/ssl/provider/SSLRSASignatureImpl.java,
* gnu/javax/net/ssl/provider/SSLServerSocketFactoryImpl.java,
* gnu/javax/net/ssl/provider/SSLServerSocketImpl.java,
* gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java,
* gnu/javax/net/ssl/provider/SSLSocketImpl.java,
* gnu/javax/net/ssl/provider/SSLv3HMacMD5Impl.java,
* gnu/javax/net/ssl/provider/SSLv3HMacSHAImpl.java,
* gnu/javax/net/ssl/provider/ServerDHE_PSKParameters.java,
* gnu/javax/net/ssl/provider/ServerDHParams.java,
* gnu/javax/net/ssl/provider/ServerHandshake.java,
* gnu/javax/net/ssl/provider/ServerHello.java,
* gnu/javax/net/ssl/provider/ServerHelloBuilder.java,
* gnu/javax/net/ssl/provider/ServerHelloDone.java,
* gnu/javax/net/ssl/provider/ServerKeyExchangeBuilder.java,
* gnu/javax/net/ssl/provider/ServerNameList.java,
* gnu/javax/net/ssl/provider/ServerPSKParameters.java,
* gnu/javax/net/ssl/provider/ServerRSA_PSKParameters.java,
* gnu/javax/net/ssl/provider/SessionImpl.java,
* gnu/javax/net/ssl/provider/Signature.java,
* gnu/javax/net/ssl/provider/SignatureAlgorithm.java,
* gnu/javax/net/ssl/provider/SimpleSessionContext.java,
* gnu/javax/net/ssl/provider/TruncatedHMAC.java,
* gnu/javax/net/ssl/provider/TrustedAuthorities.java,
* gnu/javax/net/ssl/provider/UnresolvedExtensionValue.java,
* gnu/javax/net/ssl/provider/Util.java,
* gnu/javax/net/ssl/provider/X500PrincipalList.java,
* gnu/javax/net/ssl/provider/X509KeyManagerFactory.java,
* gnu/javax/net/ssl/provider/X509TrustManagerFactory.java,
* gnu/javax/print/ipp/IppRequest.java,
* gnu/javax/rmi/CORBA/CorbaInput.java,
* gnu/javax/rmi/CORBA/CorbaOutput.java,
* gnu/javax/rmi/CORBA/DefaultWriteObjectTester.java,
* gnu/javax/rmi/CORBA/DelegateFactory.java,
* gnu/javax/rmi/CORBA/GetDelegateInstanceException.java,
* gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java,
* gnu/javax/rmi/CORBA/RmiUtilities.java,
* gnu/javax/rmi/CORBA/StubDelegateImpl.java,
* gnu/javax/rmi/CORBA/TieTargetRecord.java,
* gnu/javax/rmi/CORBA/UtilDelegateImpl.java,
* gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java,
* gnu/javax/security/auth/callback/AWTCallbackHandler.java,
* gnu/javax/security/auth/callback/AbstractCallbackHandler.java,
* gnu/javax/security/auth/callback/CertificateCallback.java,
* gnu/javax/security/auth/callback/ConsoleCallbackHandler.java,
* gnu/javax/security/auth/callback/DefaultCallbackHandler.java,
* gnu/javax/security/auth/callback/SwingCallbackHandler.java,
* gnu/javax/security/auth/login/ConfigFileParser.java,
* gnu/javax/security/auth/login/ConfigFileTokenizer.java,
* gnu/javax/security/auth/login/GnuConfiguration.java,
* gnu/javax/sound/AudioSecurityManager.java,
* gnu/javax/sound/midi/alsa/AlsaInputPortDevice.java,
* gnu/javax/sound/midi/alsa/AlsaMidiDeviceProvider.java,
* gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java,
* gnu/javax/sound/midi/alsa/AlsaOutputPortDevice.java,
* gnu/javax/sound/midi/alsa/AlsaPortDevice.java,
* gnu/javax/sound/midi/dssi/DSSIMidiDeviceProvider.java,
* gnu/javax/sound/midi/dssi/DSSISynthesizer.java,
* gnu/javax/sound/midi/file/ExtendedMidiFileFormat.java,
* gnu/javax/sound/midi/file/MidiDataInputStream.java,
* gnu/javax/sound/midi/file/MidiDataOutputStream.java,
* gnu/javax/sound/midi/file/MidiFileReader.java,
* gnu/javax/sound/midi/file/MidiFileWriter.java,
* gnu/javax/sound/sampled/AU/AUReader.java,
* gnu/javax/sound/sampled/WAV/WAVReader.java,
* gnu/javax/sound/sampled/gstreamer/GStreamerMixer.java,
* gnu/javax/sound/sampled/gstreamer/GStreamerMixerProvider.java,
* gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java,
* gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReaderNativePeer.java,
* gnu/javax/sound/sampled/gstreamer/io/GstInputStream.java,
* gnu/javax/sound/sampled/gstreamer/lines/GstDataLine.java,
* gnu/javax/sound/sampled/gstreamer/lines/GstNativeDataLine.java,
* gnu/javax/sound/sampled/gstreamer/lines/GstPipeline.java,
* gnu/javax/sound/sampled/gstreamer/lines/GstSourceDataLine.java,
* gnu/javax/swing/plaf/gnu/GNULookAndFeel.java,
* gnu/javax/swing/text/html/CharacterAttributeTranslator.java,
* gnu/javax/swing/text/html/CombinedAttributes.java,
* gnu/javax/swing/text/html/ImageViewIconFactory.java,
* gnu/javax/swing/text/html/css/BorderStyle.java,
* gnu/javax/swing/text/html/css/CSSParser.java,
* gnu/javax/swing/text/html/css/CSSScanner.java,
* gnu/javax/swing/text/html/css/Selector.java,
* gnu/javax/swing/text/html/parser/GnuParserDelegator.java,
* gnu/javax/swing/text/html/parser/HTML_401F.java,
* gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java,
* gnu/javax/swing/text/html/parser/htmlAttributeSet.java,
* gnu/javax/swing/text/html/parser/htmlValidator.java,
* gnu/javax/swing/text/html/parser/models/list.java,
* gnu/javax/swing/text/html/parser/support/Parser.java,
* gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java,
* gnu/javax/swing/text/html/parser/support/textPreProcessor.java,
* gnu/javax/swing/tree/GnuPath.java,
* gnu/test/Fail.java,
* gnu/test/Pass.java,
* gnu/test/Test.java,
* gnu/test/Unsupported.java,
* gnu/xml/aelfred2/JAXPFactory.java,
* gnu/xml/aelfred2/SAXDriver.java,
* gnu/xml/aelfred2/XmlParser.java,
* gnu/xml/aelfred2/XmlReader.java,
* gnu/xml/dom/Consumer.java,
* gnu/xml/dom/DTDAttributeTypeInfo.java,
* gnu/xml/dom/DTDElementTypeInfo.java,
* gnu/xml/dom/DomAttr.java,
* gnu/xml/dom/DomCDATASection.java,
* gnu/xml/dom/DomCharacterData.java,
* gnu/xml/dom/DomComment.java,
* gnu/xml/dom/DomDOMException.java,
* gnu/xml/dom/DomDoctype.java,
* gnu/xml/dom/DomDocument.java,
* gnu/xml/dom/DomDocumentBuilder.java,
* gnu/xml/dom/DomDocumentBuilderFactory.java,
* gnu/xml/dom/DomDocumentConfiguration.java,
* gnu/xml/dom/DomDocumentFragment.java,
* gnu/xml/dom/DomElement.java,
* gnu/xml/dom/DomEntity.java,
* gnu/xml/dom/DomEntityReference.java,
* gnu/xml/dom/DomEvent.java,
* gnu/xml/dom/DomExtern.java,
* gnu/xml/dom/DomImpl.java,
* gnu/xml/dom/DomIterator.java,
* gnu/xml/dom/DomNSResolverContext.java,
* gnu/xml/dom/DomNamedNodeMap.java,
* gnu/xml/dom/DomNode.java,
* gnu/xml/dom/DomNodeIterator.java,
* gnu/xml/dom/DomNotation.java,
* gnu/xml/dom/DomNsNode.java,
* gnu/xml/dom/DomProcessingInstruction.java,
* gnu/xml/dom/DomText.java,
* gnu/xml/dom/DomXPathExpression.java,
* gnu/xml/dom/DomXPathNSResolver.java,
* gnu/xml/dom/DomXPathResult.java,
* gnu/xml/dom/ImplementationList.java,
* gnu/xml/dom/ImplementationSource.java,
* gnu/xml/dom/JAXPFactory.java,
* gnu/xml/dom/html2/DomHTMLAnchorElement.java,
* gnu/xml/dom/html2/DomHTMLAppletElement.java,
* gnu/xml/dom/html2/DomHTMLAreaElement.java,
* gnu/xml/dom/html2/DomHTMLBRElement.java,
* gnu/xml/dom/html2/DomHTMLBaseElement.java,
* gnu/xml/dom/html2/DomHTMLBaseFontElement.java,
* gnu/xml/dom/html2/DomHTMLBodyElement.java,
* gnu/xml/dom/html2/DomHTMLButtonElement.java,
* gnu/xml/dom/html2/DomHTMLCollection.java,
* gnu/xml/dom/html2/DomHTMLDListElement.java,
* gnu/xml/dom/html2/DomHTMLDirectoryElement.java,
* gnu/xml/dom/html2/DomHTMLDivElement.java,
* gnu/xml/dom/html2/DomHTMLDocument.java,
* gnu/xml/dom/html2/DomHTMLElement.java,
* gnu/xml/dom/html2/DomHTMLEmbedElement.java,
* gnu/xml/dom/html2/DomHTMLFieldSetElement.java,
* gnu/xml/dom/html2/DomHTMLFontElement.java,
* gnu/xml/dom/html2/DomHTMLFormElement.java,
* gnu/xml/dom/html2/DomHTMLFrameElement.java,
* gnu/xml/dom/html2/DomHTMLFrameSetElement.java,
* gnu/xml/dom/html2/DomHTMLHRElement.java,
* gnu/xml/dom/html2/DomHTMLHeadElement.java,
* gnu/xml/dom/html2/DomHTMLHeadingElement.java,
* gnu/xml/dom/html2/DomHTMLHtmlElement.java,
* gnu/xml/dom/html2/DomHTMLIFrameElement.java,
* gnu/xml/dom/html2/DomHTMLImageElement.java,
* gnu/xml/dom/html2/DomHTMLImpl.java,
* gnu/xml/dom/html2/DomHTMLInputElement.java,
* gnu/xml/dom/html2/DomHTMLIsIndexElement.java,
* gnu/xml/dom/html2/DomHTMLLIElement.java,
* gnu/xml/dom/html2/DomHTMLLabelElement.java,
* gnu/xml/dom/html2/DomHTMLLegendElement.java,
* gnu/xml/dom/html2/DomHTMLLinkElement.java,
* gnu/xml/dom/html2/DomHTMLMapElement.java,
* gnu/xml/dom/html2/DomHTMLMenuElement.java,
* gnu/xml/dom/html2/DomHTMLMetaElement.java,
* gnu/xml/dom/html2/DomHTMLModElement.java,
* gnu/xml/dom/html2/DomHTMLOListElement.java,
* gnu/xml/dom/html2/DomHTMLObjectElement.java,
* gnu/xml/dom/html2/DomHTMLOptGroupElement.java,
* gnu/xml/dom/html2/DomHTMLOptionElement.java,
* gnu/xml/dom/html2/DomHTMLParagraphElement.java,
* gnu/xml/dom/html2/DomHTMLParamElement.java,
* gnu/xml/dom/html2/DomHTMLParser.java,
* gnu/xml/dom/html2/DomHTMLPreElement.java,
* gnu/xml/dom/html2/DomHTMLQuoteElement.java,
* gnu/xml/dom/html2/DomHTMLScriptElement.java,
* gnu/xml/dom/html2/DomHTMLSelectElement.java,
* gnu/xml/dom/html2/DomHTMLStyleElement.java,
* gnu/xml/dom/html2/DomHTMLTableCaptionElement.java,
* gnu/xml/dom/html2/DomHTMLTableCellElement.java,
* gnu/xml/dom/html2/DomHTMLTableColElement.java,
* gnu/xml/dom/html2/DomHTMLTableElement.java,
* gnu/xml/dom/html2/DomHTMLTableRowElement.java,
* gnu/xml/dom/html2/DomHTMLTableSectionElement.java,
* gnu/xml/dom/html2/DomHTMLTextAreaElement.java,
* gnu/xml/dom/html2/DomHTMLTitleElement.java,
* gnu/xml/dom/html2/DomHTMLUListElement.java,
* gnu/xml/dom/ls/DomLSException.java,
* gnu/xml/dom/ls/DomLSInput.java,
* gnu/xml/dom/ls/DomLSOutput.java,
* gnu/xml/dom/ls/DomLSParser.java,
* gnu/xml/dom/ls/DomLSSerializer.java,
* gnu/xml/dom/ls/FilteredSAXEventSink.java,
* gnu/xml/dom/ls/ReaderInputStream.java,
* gnu/xml/dom/ls/SAXEventSink.java,
* gnu/xml/dom/ls/WriterOutputStream.java,
* gnu/xml/libxmlj/dom/GnomeAttr.java,
* gnu/xml/libxmlj/dom/GnomeCDATASection.java,
* gnu/xml/libxmlj/dom/GnomeCharacterData.java,
* gnu/xml/libxmlj/dom/GnomeComment.java,
* gnu/xml/libxmlj/dom/GnomeDOMException.java,
* gnu/xml/libxmlj/dom/GnomeDOMStringList.java,
* gnu/xml/libxmlj/dom/GnomeDocument.java,
* gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java,
* gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java,
* gnu/xml/libxmlj/dom/GnomeDocumentFragment.java,
* gnu/xml/libxmlj/dom/GnomeDocumentType.java,
* gnu/xml/libxmlj/dom/GnomeElement.java,
* gnu/xml/libxmlj/dom/GnomeEntity.java,
* gnu/xml/libxmlj/dom/GnomeEntityReference.java,
* gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java,
* gnu/xml/libxmlj/dom/GnomeNode.java,
* gnu/xml/libxmlj/dom/GnomeNodeList.java,
* gnu/xml/libxmlj/dom/GnomeNotation.java,
* gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java,
* gnu/xml/libxmlj/dom/GnomeText.java,
* gnu/xml/libxmlj/dom/GnomeTypeInfo.java,
* gnu/xml/libxmlj/dom/GnomeXPathExpression.java,
* gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java,
* gnu/xml/libxmlj/dom/GnomeXPathNodeList.java,
* gnu/xml/libxmlj/dom/GnomeXPathResult.java,
* gnu/xml/libxmlj/sax/GnomeLocator.java,
* gnu/xml/libxmlj/sax/GnomeSAXParser.java,
* gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java,
* gnu/xml/libxmlj/sax/GnomeXMLReader.java,
* gnu/xml/libxmlj/sax/Namespaces.java,
* gnu/xml/libxmlj/sax/StringArrayAttributes.java,
* gnu/xml/libxmlj/sax/XMLName.java,
* gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java,
* gnu/xml/libxmlj/transform/GnomeTransformer.java,
* gnu/xml/libxmlj/transform/GnomeTransformerFactory.java,
* gnu/xml/libxmlj/transform/URIResolverEntityResolver.java,
* gnu/xml/libxmlj/util/EmptyNodeList.java,
* gnu/xml/libxmlj/util/NamedInputStream.java,
* gnu/xml/libxmlj/util/StandaloneDocumentType.java,
* gnu/xml/libxmlj/util/StandaloneLocator.java,
* gnu/xml/libxmlj/util/XMLJ.java,
* gnu/xml/pipeline/CallFilter.java,
* gnu/xml/pipeline/DomConsumer.java,
* gnu/xml/pipeline/EventConsumer.java,
* gnu/xml/pipeline/EventFilter.java,
* gnu/xml/pipeline/LinkFilter.java,
* gnu/xml/pipeline/NSFilter.java,
* gnu/xml/pipeline/PipelineFactory.java,
* gnu/xml/pipeline/TeeConsumer.java,
* gnu/xml/pipeline/TextConsumer.java,
* gnu/xml/pipeline/ValidationConsumer.java,
* gnu/xml/pipeline/WellFormednessFilter.java,
* gnu/xml/pipeline/XIncludeFilter.java,
* gnu/xml/pipeline/XsltFilter.java,
* gnu/xml/stream/AttributeImpl.java,
* gnu/xml/stream/BufferedReader.java,
* gnu/xml/stream/CRLFReader.java,
* gnu/xml/stream/CharactersImpl.java,
* gnu/xml/stream/CommentImpl.java,
* gnu/xml/stream/DTDImpl.java,
* gnu/xml/stream/EndDocumentImpl.java,
* gnu/xml/stream/EndElementImpl.java,
* gnu/xml/stream/EntityDeclarationImpl.java,
* gnu/xml/stream/EntityReferenceImpl.java,
* gnu/xml/stream/FilteredEventReader.java,
* gnu/xml/stream/FilteredStreamReader.java,
* gnu/xml/stream/NamespaceImpl.java,
* gnu/xml/stream/NotationDeclarationImpl.java,
* gnu/xml/stream/ProcessingInstructionImpl.java,
* gnu/xml/stream/SAXParser.java,
* gnu/xml/stream/SAXParserFactory.java,
* gnu/xml/stream/StartDocumentImpl.java,
* gnu/xml/stream/StartElementImpl.java,
* gnu/xml/stream/UnicodeReader.java,
* gnu/xml/stream/XIncludeFilter.java,
* gnu/xml/stream/XMLEventAllocatorImpl.java,
* gnu/xml/stream/XMLEventFactoryImpl.java,
* gnu/xml/stream/XMLEventImpl.java,
* gnu/xml/stream/XMLEventReaderImpl.java,
* gnu/xml/stream/XMLEventWriterImpl.java,
* gnu/xml/stream/XMLInputFactoryImpl.java,
* gnu/xml/stream/XMLOutputFactoryImpl.java,
* gnu/xml/stream/XMLParser.java,
* gnu/xml/stream/XMLStreamWriterImpl.java,
* gnu/xml/transform/AbstractNumberNode.java,
* gnu/xml/transform/ApplyImportsNode.java,
* gnu/xml/transform/ApplyTemplatesNode.java,
* gnu/xml/transform/AttributeNode.java,
* gnu/xml/transform/AttributeSet.java,
* gnu/xml/transform/Bindings.java,
* gnu/xml/transform/CallTemplateNode.java,
* gnu/xml/transform/ChooseNode.java,
* gnu/xml/transform/CommentNode.java,
* gnu/xml/transform/CopyNode.java,
* gnu/xml/transform/CopyOfNode.java,
* gnu/xml/transform/CurrentFunction.java,
* gnu/xml/transform/DOMSourceLocator.java,
* gnu/xml/transform/DocumentFunction.java,
* gnu/xml/transform/ElementAvailableFunction.java,
* gnu/xml/transform/ElementNode.java,
* gnu/xml/transform/ErrorListenerErrorHandler.java,
* gnu/xml/transform/ForEachNode.java,
* gnu/xml/transform/FormatNumberFunction.java,
* gnu/xml/transform/FunctionAvailableFunction.java,
* gnu/xml/transform/GenerateIdFunction.java,
* gnu/xml/transform/IfNode.java,
* gnu/xml/transform/Key.java,
* gnu/xml/transform/KeyFunction.java,
* gnu/xml/transform/LiteralNode.java,
* gnu/xml/transform/MessageNode.java,
* gnu/xml/transform/NamespaceProxy.java,
* gnu/xml/transform/NodeNumberNode.java,
* gnu/xml/transform/NumberNode.java,
* gnu/xml/transform/OtherwiseNode.java,
* gnu/xml/transform/ParameterNode.java,
* gnu/xml/transform/ProcessingInstructionNode.java,
* gnu/xml/transform/SAXSerializer.java,
* gnu/xml/transform/SAXTemplatesHandler.java,
* gnu/xml/transform/SAXTransformerHandler.java,
* gnu/xml/transform/SortKey.java,
* gnu/xml/transform/StreamSerializer.java,
* gnu/xml/transform/StrippingInstruction.java,
* gnu/xml/transform/Stylesheet.java,
* gnu/xml/transform/SystemPropertyFunction.java,
* gnu/xml/transform/Template.java,
* gnu/xml/transform/TemplateNode.java,
* gnu/xml/transform/TemplatesImpl.java,
* gnu/xml/transform/TextNode.java,
* gnu/xml/transform/TransformerFactoryImpl.java,
* gnu/xml/transform/TransformerImpl.java,
* gnu/xml/transform/TransformerOutputProperties.java,
* gnu/xml/transform/URIResolverEntityResolver.java,
* gnu/xml/transform/UnparsedEntityUriFunction.java,
* gnu/xml/transform/ValueOfNode.java,
* gnu/xml/transform/WhenNode.java,
* gnu/xml/transform/WithParam.java,
* gnu/xml/transform/XSLComparator.java,
* gnu/xml/transform/XSLURIResolver.java,
* gnu/xml/util/DoParse.java,
* gnu/xml/util/DomParser.java,
* gnu/xml/util/Resolver.java,
* gnu/xml/util/SAXNullTransformerFactory.java,
* gnu/xml/util/XCat.java,
* gnu/xml/util/XHTMLWriter.java,
* gnu/xml/util/XMLWriter.java,
* gnu/xml/validation/datatype/Annotation.java,
* gnu/xml/validation/datatype/AnySimpleType.java,
* gnu/xml/validation/datatype/AnyType.java,
* gnu/xml/validation/datatype/AnyURIType.java,
* gnu/xml/validation/datatype/AtomicSimpleType.java,
* gnu/xml/validation/datatype/Base64BinaryType.java,
* gnu/xml/validation/datatype/BooleanType.java,
* gnu/xml/validation/datatype/ByteType.java,
* gnu/xml/validation/datatype/DateTimeType.java,
* gnu/xml/validation/datatype/DateType.java,
* gnu/xml/validation/datatype/DecimalType.java,
* gnu/xml/validation/datatype/DoubleType.java,
* gnu/xml/validation/datatype/DurationType.java,
* gnu/xml/validation/datatype/EntitiesType.java,
* gnu/xml/validation/datatype/EntityType.java,
* gnu/xml/validation/datatype/EnumerationFacet.java,
* gnu/xml/validation/datatype/Facet.java,
* gnu/xml/validation/datatype/FloatType.java,
* gnu/xml/validation/datatype/FractionDigitsFacet.java,
* gnu/xml/validation/datatype/GDayType.java,
* gnu/xml/validation/datatype/GMonthDayType.java,
* gnu/xml/validation/datatype/GMonthType.java,
* gnu/xml/validation/datatype/GYearMonthType.java,
* gnu/xml/validation/datatype/GYearType.java,
* gnu/xml/validation/datatype/HexBinaryType.java,
* gnu/xml/validation/datatype/IDRefType.java,
* gnu/xml/validation/datatype/IDRefsType.java,
* gnu/xml/validation/datatype/IDType.java,
* gnu/xml/validation/datatype/IntType.java,
* gnu/xml/validation/datatype/IntegerType.java,
* gnu/xml/validation/datatype/LanguageType.java,
* gnu/xml/validation/datatype/LengthFacet.java,
* gnu/xml/validation/datatype/ListSimpleType.java,
* gnu/xml/validation/datatype/LongType.java,
* gnu/xml/validation/datatype/MaxExclusiveFacet.java,
* gnu/xml/validation/datatype/MaxInclusiveFacet.java,
* gnu/xml/validation/datatype/MaxLengthFacet.java,
* gnu/xml/validation/datatype/MinExclusiveFacet.java,
* gnu/xml/validation/datatype/MinInclusiveFacet.java,
* gnu/xml/validation/datatype/MinLengthFacet.java,
* gnu/xml/validation/datatype/NCNameType.java,
* gnu/xml/validation/datatype/NMTokenType.java,
* gnu/xml/validation/datatype/NMTokensType.java,
* gnu/xml/validation/datatype/NameType.java,
* gnu/xml/validation/datatype/NegativeIntegerType.java,
* gnu/xml/validation/datatype/NonNegativeIntegerType.java,
* gnu/xml/validation/datatype/NonPositiveIntegerType.java,
* gnu/xml/validation/datatype/NormalizedStringType.java,
* gnu/xml/validation/datatype/NotationType.java,
* gnu/xml/validation/datatype/PatternFacet.java,
* gnu/xml/validation/datatype/PositiveIntegerType.java,
* gnu/xml/validation/datatype/QNameType.java,
* gnu/xml/validation/datatype/ShortType.java,
* gnu/xml/validation/datatype/SimpleType.java,
* gnu/xml/validation/datatype/StringType.java,
* gnu/xml/validation/datatype/TimeType.java,
* gnu/xml/validation/datatype/TokenType.java,
* gnu/xml/validation/datatype/TotalDigitsFacet.java,
* gnu/xml/validation/datatype/Type.java,
* gnu/xml/validation/datatype/TypeBuilder.java,
* gnu/xml/validation/datatype/TypeLibrary.java,
* gnu/xml/validation/datatype/TypeLibraryFactory.java,
* gnu/xml/validation/datatype/UnionSimpleType.java,
* gnu/xml/validation/datatype/UnsignedByteType.java,
* gnu/xml/validation/datatype/UnsignedIntType.java,
* gnu/xml/validation/datatype/UnsignedLongType.java,
* gnu/xml/validation/datatype/UnsignedShortType.java,
* gnu/xml/validation/datatype/WhiteSpaceFacet.java,
* gnu/xml/validation/relaxng/AnyNameNameClass.java,
* gnu/xml/validation/relaxng/AttributePattern.java,
* gnu/xml/validation/relaxng/ChoiceNameClass.java,
* gnu/xml/validation/relaxng/ChoicePattern.java,
* gnu/xml/validation/relaxng/DataPattern.java,
* gnu/xml/validation/relaxng/Define.java,
* gnu/xml/validation/relaxng/ElementPattern.java,
* gnu/xml/validation/relaxng/EmptyPattern.java,
* gnu/xml/validation/relaxng/FullSyntaxBuilder.java,
* gnu/xml/validation/relaxng/Grammar.java,
* gnu/xml/validation/relaxng/GrammarException.java,
* gnu/xml/validation/relaxng/GrammarValidator.java,
* gnu/xml/validation/relaxng/GroupPattern.java,
* gnu/xml/validation/relaxng/InterleavePattern.java,
* gnu/xml/validation/relaxng/ListPattern.java,
* gnu/xml/validation/relaxng/NSNameNameClass.java,
* gnu/xml/validation/relaxng/NameClass.java,
* gnu/xml/validation/relaxng/NameNameClass.java,
* gnu/xml/validation/relaxng/NotAllowedPattern.java,
* gnu/xml/validation/relaxng/OneOrMorePattern.java,
* gnu/xml/validation/relaxng/Param.java,
* gnu/xml/validation/relaxng/Pattern.java,
* gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java,
* gnu/xml/validation/relaxng/RefPattern.java,
* gnu/xml/validation/relaxng/TextPattern.java,
* gnu/xml/validation/relaxng/ValuePattern.java,
* gnu/xml/validation/xmlschema/AnyAttribute.java,
* gnu/xml/validation/xmlschema/AttributeDeclaration.java,
* gnu/xml/validation/xmlschema/AttributeUse.java,
* gnu/xml/validation/xmlschema/ComplexType.java,
* gnu/xml/validation/xmlschema/ElementDeclaration.java,
* gnu/xml/validation/xmlschema/Particle.java,
* gnu/xml/validation/xmlschema/ValidationException.java,
* gnu/xml/validation/xmlschema/XMLSchema.java,
* gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java,
* gnu/xml/validation/xmlschema/XMLSchemaBuilder.java,
* gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java,
* gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java,
* gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java,
* gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java,
* gnu/xml/validation/xmlschema/XMLSchemaValidator.java,
* gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java,
* gnu/xml/xpath/AndExpr.java,
* gnu/xml/xpath/ArithmeticExpr.java,
* gnu/xml/xpath/BooleanFunction.java,
* gnu/xml/xpath/CeilingFunction.java,
* gnu/xml/xpath/ConcatFunction.java,
* gnu/xml/xpath/Constant.java,
* gnu/xml/xpath/ContainsFunction.java,
* gnu/xml/xpath/CountFunction.java,
* gnu/xml/xpath/DocumentOrderComparator.java,
* gnu/xml/xpath/EqualityExpr.java,
* gnu/xml/xpath/Expr.java,
* gnu/xml/xpath/FalseFunction.java,
* gnu/xml/xpath/FloorFunction.java,
* gnu/xml/xpath/Function.java,
* gnu/xml/xpath/FunctionCall.java,
* gnu/xml/xpath/IdFunction.java,
* gnu/xml/xpath/LangFunction.java,
* gnu/xml/xpath/LastFunction.java,
* gnu/xml/xpath/LocalNameFunction.java,
* gnu/xml/xpath/NameFunction.java,
* gnu/xml/xpath/NameTest.java,
* gnu/xml/xpath/NamespaceTest.java,
* gnu/xml/xpath/NamespaceUriFunction.java,
* gnu/xml/xpath/NegativeExpr.java,
* gnu/xml/xpath/NodeTypeTest.java,
* gnu/xml/xpath/NormalizeSpaceFunction.java,
* gnu/xml/xpath/NotFunction.java,
* gnu/xml/xpath/NumberFunction.java,
* gnu/xml/xpath/OrExpr.java,
* gnu/xml/xpath/ParenthesizedExpr.java,
* gnu/xml/xpath/Path.java,
* gnu/xml/xpath/Pattern.java,
* gnu/xml/xpath/PositionFunction.java,
* gnu/xml/xpath/Predicate.java,
* gnu/xml/xpath/RelationalExpr.java,
* gnu/xml/xpath/Root.java,
* gnu/xml/xpath/RoundFunction.java,
* gnu/xml/xpath/Selector.java,
* gnu/xml/xpath/StartsWithFunction.java,
* gnu/xml/xpath/Steps.java,
* gnu/xml/xpath/StringFunction.java,
* gnu/xml/xpath/StringLengthFunction.java,
* gnu/xml/xpath/SubstringAfterFunction.java,
* gnu/xml/xpath/SubstringBeforeFunction.java,
* gnu/xml/xpath/SubstringFunction.java,
* gnu/xml/xpath/SumFunction.java,
* gnu/xml/xpath/Test.java,
* gnu/xml/xpath/TranslateFunction.java,
* gnu/xml/xpath/TrueFunction.java,
* gnu/xml/xpath/UnionExpr.java,
* gnu/xml/xpath/VariableReference.java,
* gnu/xml/xpath/XPathFactoryImpl.java,
* gnu/xml/xpath/XPathImpl.java,
* gnu/xml/xpath/XPathParser.java,
* gnu/xml/xpath/XPathTokenizer.java,
* java/applet/Applet.java,
* java/awt/AWTEvent.java,
* java/awt/AWTEventMulticaster.java,
* java/awt/AWTKeyStroke.java,
* java/awt/AlphaComposite.java,
* java/awt/BasicStroke.java,
* java/awt/BorderLayout.java,
* java/awt/BufferCapabilities.java,
* java/awt/Button.java,
* java/awt/Canvas.java,
* java/awt/CardLayout.java,
* java/awt/Checkbox.java,
* java/awt/CheckboxGroup.java,
* java/awt/CheckboxMenuItem.java,
* java/awt/Choice.java,
* java/awt/Color.java,
* java/awt/ColorPaintContext.java,
* java/awt/Component.java,
* java/awt/Container.java,
* java/awt/ContainerOrderFocusTraversalPolicy.java,
* java/awt/Cursor.java,
* java/awt/DefaultFocusTraversalPolicy.java,
* java/awt/DefaultKeyboardFocusManager.java,
* java/awt/Desktop.java,
* java/awt/Dialog.java,
* java/awt/DisplayMode.java,
* java/awt/Event.java,
* java/awt/EventDispatchThread.java,
* java/awt/EventQueue.java,
* java/awt/FileDialog.java,
* java/awt/FlowLayout.java,
* java/awt/FocusTraversalPolicy.java,
* java/awt/Font.java,
* java/awt/FontMetrics.java,
* java/awt/Frame.java,
* java/awt/GradientPaint.java,
* java/awt/Graphics.java,
* java/awt/Graphics2D.java,
* java/awt/GraphicsConfiguration.java,
* java/awt/GraphicsDevice.java,
* java/awt/GridBagConstraints.java,
* java/awt/GridBagLayout.java,
* java/awt/GridLayout.java,
* java/awt/Image.java,
* java/awt/Insets.java,
* java/awt/JobAttributes.java,
* java/awt/KeyboardFocusManager.java,
* java/awt/Label.java,
* java/awt/LightweightDispatcher.java,
* java/awt/List.java,
* java/awt/MediaTracker.java,
* java/awt/Menu.java,
* java/awt/MenuBar.java,
* java/awt/MenuComponent.java,
* java/awt/MenuItem.java,
* java/awt/MenuShortcut.java,
* java/awt/MouseInfo.java,
* java/awt/PageAttributes.java,
* java/awt/Point.java,
* java/awt/PointerInfo.java,
* java/awt/Polygon.java,
* java/awt/PopupMenu.java,
* java/awt/Rectangle.java,
* java/awt/RenderingHints.java,
* java/awt/Robot.java,
* java/awt/ScrollPane.java,
* java/awt/ScrollPaneAdjustable.java,
* java/awt/Scrollbar.java,
* java/awt/Shape.java,
* java/awt/SystemColor.java,
* java/awt/TextArea.java,
* java/awt/TextComponent.java,
* java/awt/TextField.java,
* java/awt/TexturePaint.java,
* java/awt/Toolkit.java,
* java/awt/Window.java,
* java/awt/color/ICC_ColorSpace.java,
* java/awt/color/ICC_Profile.java,
* java/awt/color/ICC_ProfileGray.java,
* java/awt/color/ICC_ProfileRGB.java,
* java/awt/datatransfer/Clipboard.java,
* java/awt/datatransfer/ClipboardOwner.java,
* java/awt/datatransfer/DataFlavor.java,
* java/awt/datatransfer/FlavorEvent.java,
* java/awt/datatransfer/FlavorListener.java,
* java/awt/datatransfer/MimeType.java,
* java/awt/datatransfer/StringSelection.java,
* java/awt/datatransfer/SystemFlavorMap.java,
* java/awt/datatransfer/Transferable.java,
* java/awt/datatransfer/UnsupportedFlavorException.java,
* java/awt/dnd/Autoscroll.java,
* java/awt/dnd/DnDEventMulticaster.java,
* java/awt/dnd/DragGestureEvent.java,
* java/awt/dnd/DragGestureRecognizer.java,
* java/awt/dnd/DragSource.java,
* java/awt/dnd/DragSourceContext.java,
* java/awt/dnd/DragSourceDropEvent.java,
* java/awt/dnd/DragSourceEvent.java,
* java/awt/dnd/DropTarget.java,
* java/awt/dnd/DropTargetContext.java,
* java/awt/dnd/DropTargetDragEvent.java,
* java/awt/dnd/DropTargetDropEvent.java,
* java/awt/dnd/DropTargetEvent.java,
* java/awt/dnd/MouseDragGestureRecognizer.java,
* java/awt/dnd/peer/DropTargetContextPeer.java,
* java/awt/event/AWTEventListener.java,
* java/awt/event/ActionEvent.java,
* java/awt/event/ComponentAdapter.java,
* java/awt/event/ComponentEvent.java,
* java/awt/event/InputEvent.java,
* java/awt/event/InputMethodEvent.java,
* java/awt/event/InvocationEvent.java,
* java/awt/event/KeyEvent.java,
* java/awt/event/MouseEvent.java,
* java/awt/event/MouseListener.java,
* java/awt/event/MouseWheelEvent.java,
* java/awt/event/WindowEvent.java,
* java/awt/font/FontRenderContext.java,
* java/awt/font/GlyphJustificationInfo.java,
* java/awt/font/GlyphMetrics.java,
* java/awt/font/GlyphVector.java,
* java/awt/font/GraphicAttribute.java,
* java/awt/font/ImageGraphicAttribute.java,
* java/awt/font/LineBreakMeasurer.java,
* java/awt/font/LineMetrics.java,
* java/awt/font/MultipleMaster.java,
* java/awt/font/OpenType.java,
* java/awt/font/ShapeGraphicAttribute.java,
* java/awt/font/TextAttribute.java,
* java/awt/font/TextHitInfo.java,
* java/awt/font/TextLayout.java,
* java/awt/font/TextMeasurer.java,
* java/awt/font/TransformAttribute.java,
* java/awt/geom/AffineTransform.java,
* java/awt/geom/Arc2D.java,
* java/awt/geom/Area.java,
* java/awt/geom/CubicCurve2D.java,
* java/awt/geom/Ellipse2D.java,
* java/awt/geom/FlatteningPathIterator.java,
* java/awt/geom/GeneralPath.java,
* java/awt/geom/Line2D.java,
* java/awt/geom/QuadCurve2D.java,
* java/awt/geom/RectangularShape.java,
* java/awt/geom/RoundRectangle2D.java,
* java/awt/im/InputContext.java,
* java/awt/im/spi/InputMethodDescriptor.java,
* java/awt/image/AffineTransformOp.java,
* java/awt/image/AreaAveragingScaleFilter.java,
* java/awt/image/BandCombineOp.java,
* java/awt/image/BandedSampleModel.java,
* java/awt/image/BufferedImage.java,
* java/awt/image/BufferedImageFilter.java,
* java/awt/image/BufferedImageOp.java,
* java/awt/image/ByteLookupTable.java,
* java/awt/image/ColorConvertOp.java,
* java/awt/image/ColorModel.java,
* java/awt/image/ComponentColorModel.java,
* java/awt/image/ComponentSampleModel.java,
* java/awt/image/ConvolveOp.java,
* java/awt/image/CropImageFilter.java,
* java/awt/image/DataBuffer.java,
* java/awt/image/DataBufferByte.java,
* java/awt/image/DataBufferDouble.java,
* java/awt/image/DataBufferFloat.java,
* java/awt/image/DataBufferInt.java,
* java/awt/image/DataBufferShort.java,
* java/awt/image/DataBufferUShort.java,
* java/awt/image/DirectColorModel.java,
* java/awt/image/FilteredImageSource.java,
* java/awt/image/ImageConsumer.java,
* java/awt/image/ImageFilter.java,
* java/awt/image/ImageObserver.java,
* java/awt/image/ImageProducer.java,
* java/awt/image/IndexColorModel.java,
* java/awt/image/Kernel.java,
* java/awt/image/LookupOp.java,
* java/awt/image/LookupTable.java,
* java/awt/image/MemoryImageSource.java,
* java/awt/image/MultiPixelPackedSampleModel.java,
* java/awt/image/PackedColorModel.java,
* java/awt/image/PixelGrabber.java,
* java/awt/image/PixelInterleavedSampleModel.java,
* java/awt/image/RGBImageFilter.java,
* java/awt/image/Raster.java,
* java/awt/image/RasterOp.java,
* java/awt/image/RenderedImage.java,
* java/awt/image/ReplicateScaleFilter.java,
* java/awt/image/RescaleOp.java,
* java/awt/image/SampleModel.java,
* java/awt/image/ShortLookupTable.java,
* java/awt/image/SinglePixelPackedSampleModel.java,
* java/awt/image/TileObserver.java,
* java/awt/image/WritableRaster.java,
* java/awt/image/WritableRenderedImage.java,
* java/awt/image/renderable/ContextualRenderedImageFactory.java,
* java/awt/image/renderable/ParameterBlock.java,
* java/awt/image/renderable/RenderContext.java,
* java/awt/image/renderable/RenderableImage.java,
* java/awt/image/renderable/RenderableImageOp.java,
* java/awt/image/renderable/RenderableImageProducer.java,
* java/awt/image/renderable/RenderedImageFactory.java,
* java/awt/peer/ButtonPeer.java,
* java/awt/peer/CanvasPeer.java,
* java/awt/peer/CheckboxMenuItemPeer.java,
* java/awt/peer/CheckboxPeer.java,
* java/awt/peer/ChoicePeer.java,
* java/awt/peer/ComponentPeer.java,
* java/awt/peer/ContainerPeer.java,
* java/awt/peer/DesktopPeer.java,
* java/awt/peer/DialogPeer.java,
* java/awt/peer/FileDialogPeer.java,
* java/awt/peer/FontPeer.java,
* java/awt/peer/FramePeer.java,
* java/awt/peer/LabelPeer.java,
* java/awt/peer/LightweightPeer.java,
* java/awt/peer/ListPeer.java,
* java/awt/peer/MenuBarPeer.java,
* java/awt/peer/MenuComponentPeer.java,
* java/awt/peer/MenuItemPeer.java,
* java/awt/peer/MenuPeer.java,
* java/awt/peer/MouseInfoPeer.java,
* java/awt/peer/PanelPeer.java,
* java/awt/peer/PopupMenuPeer.java,
* java/awt/peer/RobotPeer.java,
* java/awt/peer/ScrollPanePeer.java,
* java/awt/peer/ScrollbarPeer.java,
* java/awt/peer/TextComponentPeer.java,
* java/awt/peer/TextFieldPeer.java,
* java/awt/peer/WindowPeer.java,
* java/awt/print/Book.java,
* java/awt/print/PageFormat.java,
* java/awt/print/Pageable.java,
* java/awt/print/Paper.java,
* java/awt/print/PrinterGraphics.java,
* java/awt/print/PrinterIOException.java,
* java/awt/print/PrinterJob.java,
* java/beans/AppletInitializer.java,
* java/beans/BeanDescriptor.java,
* java/beans/BeanInfo.java,
* java/beans/Beans.java,
* java/beans/Customizer.java,
* java/beans/DefaultPersistenceDelegate.java,
* java/beans/DesignMode.java,
* java/beans/Encoder.java,
* java/beans/EventHandler.java,
* java/beans/EventSetDescriptor.java,
* java/beans/Expression.java,
* java/beans/FeatureDescriptor.java,
* java/beans/IndexedPropertyChangeEvent.java,
* java/beans/IndexedPropertyDescriptor.java,
* java/beans/Introspector.java,
* java/beans/MethodDescriptor.java,
* java/beans/ParameterDescriptor.java,
* java/beans/PersistenceDelegate.java,
* java/beans/PropertyChangeSupport.java,
* java/beans/PropertyDescriptor.java,
* java/beans/PropertyEditor.java,
* java/beans/PropertyEditorManager.java,
* java/beans/SimpleBeanInfo.java,
* java/beans/Statement.java,
* java/beans/VetoableChangeSupport.java,
* java/beans/Visibility.java,
* java/beans/XMLDecoder.java,
* java/beans/XMLEncoder.java,
* java/beans/beancontext/BeanContext.java,
* java/beans/beancontext/BeanContextChild.java,
* java/beans/beancontext/BeanContextChildComponentProxy.java,
* java/beans/beancontext/BeanContextChildSupport.java,
* java/beans/beancontext/BeanContextContainerProxy.java,
* java/beans/beancontext/BeanContextEvent.java,
* java/beans/beancontext/BeanContextMembershipEvent.java,
* java/beans/beancontext/BeanContextMembershipListener.java,
* java/beans/beancontext/BeanContextProxy.java,
* java/beans/beancontext/BeanContextServiceAvailableEvent.java,
* java/beans/beancontext/BeanContextServiceProvider.java,
* java/beans/beancontext/BeanContextServiceProviderBeanInfo.java,
* java/beans/beancontext/BeanContextServiceRevokedEvent.java,
* java/beans/beancontext/BeanContextServiceRevokedListener.java,
* java/beans/beancontext/BeanContextServices.java,
* java/beans/beancontext/BeanContextServicesListener.java,
* java/beans/beancontext/BeanContextServicesSupport.java,
* java/beans/beancontext/BeanContextSupport.java,
* java/io/BufferedInputStream.java,
* java/io/BufferedOutputStream.java,
* java/io/BufferedReader.java,
* java/io/BufferedWriter.java,
* java/io/ByteArrayInputStream.java,
* java/io/ByteArrayOutputStream.java,
* java/io/CharArrayReader.java,
* java/io/CharArrayWriter.java,
* java/io/DataInput.java,
* java/io/DataInputStream.java,
* java/io/DataOutput.java,
* java/io/DataOutputStream.java,
* java/io/DeleteFileHelper.java,
* java/io/EOFException.java,
* java/io/Externalizable.java,
* java/io/File.java,
* java/io/FileDescriptor.java,
* java/io/FileFilter.java,
* java/io/FileInputStream.java,
* java/io/FileOutputStream.java,
* java/io/FilePermission.java,
* java/io/FileReader.java,
* java/io/FileWriter.java,
* java/io/FilenameFilter.java,
* java/io/FilterInputStream.java,
* java/io/FilterOutputStream.java,
* java/io/FilterReader.java,
* java/io/FilterWriter.java,
* java/io/InputStream.java,
* java/io/InputStreamReader.java,
* java/io/InvalidClassException.java,
* java/io/LineNumberInputStream.java,
* java/io/LineNumberReader.java,
* java/io/ObjectInput.java,
* java/io/ObjectInputStream.java,
* java/io/ObjectInputValidation.java,
* java/io/ObjectOutput.java,
* java/io/ObjectOutputStream.java,
* java/io/ObjectStreamClass.java,
* java/io/ObjectStreamConstants.java,
* java/io/ObjectStreamField.java,
* java/io/OutputStream.java,
* java/io/OutputStreamWriter.java,
* java/io/PipedInputStream.java,
* java/io/PipedOutputStream.java,
* java/io/PipedReader.java,
* java/io/PipedWriter.java,
* java/io/PrintStream.java,
* java/io/PrintWriter.java,
* java/io/PushbackInputStream.java,
* java/io/PushbackReader.java,
* java/io/RandomAccessFile.java,
* java/io/Reader.java,
* java/io/SequenceInputStream.java,
* java/io/Serializable.java,
* java/io/SerializablePermission.java,
* java/io/StreamTokenizer.java,
* java/io/StringBufferInputStream.java,
* java/io/StringReader.java,
* java/io/StringWriter.java,
* java/io/UnsupportedEncodingException.java,
* java/io/Writer.java,
* java/lang/AbstractStringBuffer.java,
* java/lang/Boolean.java,
* java/lang/Character.java,
* java/lang/Class.java,
* java/lang/ClassLoader.java,
* java/lang/Comparable.java,
* java/lang/Double.java,
* java/lang/Enum.java,
* java/lang/EnumConstantNotPresentException.java,
* java/lang/Float.java,
* java/lang/IllegalArgumentException.java,
* java/lang/IllegalStateException.java,
* java/lang/IndexOutOfBoundsException.java,
* java/lang/Integer.java,
* java/lang/Long.java,
* java/lang/Math.java,
* java/lang/NoClassDefFoundError.java,
* java/lang/Object.java,
* java/lang/Package.java,
* java/lang/ProcessBuilder.java,
* java/lang/Runtime.java,
* java/lang/SecurityException.java,
* java/lang/SecurityManager.java,
* java/lang/StackTraceElement.java,
* java/lang/StrictMath.java,
* java/lang/String.java,
* java/lang/StringBuffer.java,
* java/lang/StringBuilder.java,
* java/lang/System.java,
* java/lang/Thread.java,
* java/lang/ThreadLocal.java,
* java/lang/Throwable.java,
* java/lang/TypeNotPresentException.java,
* java/lang/UnsupportedOperationException.java,
* java/lang/annotation/Annotation.java,
* java/lang/annotation/AnnotationTypeMismatchException.java,
* java/lang/annotation/IncompleteAnnotationException.java,
* java/lang/instrument/ClassFileTransformer.java,
* java/lang/instrument/Instrumentation.java,
* java/lang/management/ClassLoadingMXBean.java,
* java/lang/management/CompilationMXBean.java,
* java/lang/management/GarbageCollectorMXBean.java,
* java/lang/management/ManagementFactory.java,
* java/lang/management/ManagementPermission.java,
* java/lang/management/MemoryMXBean.java,
* java/lang/management/MemoryManagerMXBean.java,
* java/lang/management/MemoryNotificationInfo.java,
* java/lang/management/MemoryPoolMXBean.java,
* java/lang/management/MemoryType.java,
* java/lang/management/MemoryUsage.java,
* java/lang/management/MonitorInfo.java,
* java/lang/management/OperatingSystemMXBean.java,
* java/lang/management/RuntimeMXBean.java,
* java/lang/management/ThreadInfo.java,
* java/lang/management/ThreadMXBean.java,
* java/lang/ref/PhantomReference.java,
* java/lang/ref/Reference.java,
* java/lang/ref/ReferenceQueue.java,
* java/lang/ref/SoftReference.java,
* java/lang/ref/WeakReference.java,
* java/lang/reflect/AccessibleObject.java,
* java/lang/reflect/AnnotatedElement.java,
* java/lang/reflect/Array.java,
* java/lang/reflect/Constructor.java,
* java/lang/reflect/Field.java,
* java/lang/reflect/GenericArrayType.java,
* java/lang/reflect/GenericDeclaration.java,
* java/lang/reflect/InvocationHandler.java,
* java/lang/reflect/MalformedParameterizedTypeException.java,
* java/lang/reflect/Method.java,
* java/lang/reflect/Modifier.java,
* java/lang/reflect/Proxy.java,
* java/lang/reflect/Type.java,
* java/lang/reflect/TypeVariable.java,
* java/lang/reflect/WildcardType.java,
* java/math/BigDecimal.java,
* java/math/BigInteger.java,
* java/math/MathContext.java,
* java/math/RoundingMode.java,
* java/net/ContentHandler.java,
* java/net/DatagramSocket.java,
* java/net/DatagramSocketImpl.java,
* java/net/HttpURLConnection.java,
* java/net/Inet4Address.java,
* java/net/Inet6Address.java,
* java/net/InetAddress.java,
* java/net/InetSocketAddress.java,
* java/net/MimeTypeMapper.java,
* java/net/MulticastSocket.java,
* java/net/NetworkInterface.java,
* java/net/Proxy.java,
* java/net/ProxySelector.java,
* java/net/ResolverCache.java,
* java/net/ServerSocket.java,
* java/net/Socket.java,
* java/net/SocketPermission.java,
* java/net/URI.java,
* java/net/URL.java,
* java/net/URLClassLoader.java,
* java/net/URLConnection.java,
* java/net/URLDecoder.java,
* java/net/URLEncoder.java,
* java/net/URLStreamHandler.java,
* java/nio/Buffer.java,
* java/nio/BufferOverflowException.java,
* java/nio/BufferUnderflowException.java,
* java/nio/ByteBuffer.java,
* java/nio/ByteBufferHelper.java,
* java/nio/ByteBufferImpl.java,
* java/nio/ByteOrder.java,
* java/nio/CharBuffer.java,
* java/nio/CharBufferImpl.java,
* java/nio/CharSequenceBuffer.java,
* java/nio/CharViewBufferImpl.java,
* java/nio/DirectByteBufferImpl.java,
* java/nio/DoubleBuffer.java,
* java/nio/DoubleBufferImpl.java,
* java/nio/DoubleViewBufferImpl.java,
* java/nio/FloatBuffer.java,
* java/nio/FloatBufferImpl.java,
* java/nio/FloatViewBufferImpl.java,
* java/nio/IntBuffer.java,
* java/nio/IntBufferImpl.java,
* java/nio/IntViewBufferImpl.java,
* java/nio/InvalidMarkException.java,
* java/nio/LongBuffer.java,
* java/nio/LongBufferImpl.java,
* java/nio/LongViewBufferImpl.java,
* java/nio/MappedByteBuffer.java,
* java/nio/MappedByteBufferImpl.java,
* java/nio/ReadOnlyBufferException.java,
* java/nio/ShortBuffer.java,
* java/nio/ShortBufferImpl.java,
* java/nio/ShortViewBufferImpl.java,
* java/nio/channels/FileChannel.java,
* java/nio/channels/SocketChannel.java,
* java/nio/channels/spi/AbstractInterruptibleChannel.java,
* java/nio/channels/spi/AbstractSelectableChannel.java,
* java/nio/channels/spi/AbstractSelectionKey.java,
* java/nio/channels/spi/AbstractSelector.java,
* java/nio/channels/spi/SelectorProvider.java,
* java/nio/charset/CharacterCodingException.java,
* java/nio/charset/Charset.java,
* java/nio/charset/CharsetDecoder.java,
* java/nio/charset/CharsetEncoder.java,
* java/nio/charset/CoderMalfunctionError.java,
* java/nio/charset/CoderResult.java,
* java/nio/charset/CodingErrorAction.java,
* java/nio/charset/IllegalCharsetNameException.java,
* java/nio/charset/MalformedInputException.java,
* java/nio/charset/UnmappableCharacterException.java,
* java/nio/charset/UnsupportedCharsetException.java,
* java/rmi/AccessException.java,
* java/rmi/AlreadyBoundException.java,
* java/rmi/MarshalledObject.java,
* java/rmi/Naming.java,
* java/rmi/NoSuchObjectException.java,
* java/rmi/NotBoundException.java,
* java/rmi/RMISecurityException.java,
* java/rmi/RMISecurityManager.java,
* java/rmi/Remote.java,
* java/rmi/RemoteException.java,
* java/rmi/StubNotFoundException.java,
* java/rmi/UnknownHostException.java,
* java/rmi/activation/Activatable.java,
* java/rmi/activation/ActivationDesc.java,
* java/rmi/activation/ActivationGroup.java,
* java/rmi/activation/ActivationGroupDesc.java,
* java/rmi/activation/ActivationGroupID.java,
* java/rmi/activation/ActivationID.java,
* java/rmi/activation/ActivationInstantiator.java,
* java/rmi/activation/ActivationMonitor.java,
* java/rmi/activation/ActivationSystem.java,
* java/rmi/activation/Activator.java,
* java/rmi/activation/UnknownGroupException.java,
* java/rmi/dgc/DGC.java,
* java/rmi/dgc/Lease.java,
* java/rmi/dgc/VMID.java,
* java/rmi/registry/LocateRegistry.java,
* java/rmi/registry/Registry.java,
* java/rmi/registry/RegistryHandler.java,
* java/rmi/server/LoaderHandler.java,
* java/rmi/server/LogStream.java,
* java/rmi/server/ObjID.java,
* java/rmi/server/Operation.java,
* java/rmi/server/RMIClassLoader.java,
* java/rmi/server/RMIClientSocketFactory.java,
* java/rmi/server/RMIFailureHandler.java,
* java/rmi/server/RMIServerSocketFactory.java,
* java/rmi/server/RMISocketFactory.java,
* java/rmi/server/RemoteCall.java,
* java/rmi/server/RemoteObject.java,
* java/rmi/server/RemoteObjectInvocationHandler.java,
* java/rmi/server/RemoteRef.java,
* java/rmi/server/RemoteServer.java,
* java/rmi/server/RemoteStub.java,
* java/rmi/server/ServerRef.java,
* java/rmi/server/Skeleton.java,
* java/rmi/server/UID.java,
* java/rmi/server/UnicastRemoteObject.java,
* java/rmi/server/Unreferenced.java,
* java/security/AccessControlContext.java,
* java/security/AccessController.java,
* java/security/AlgorithmParameterGenerator.java,
* java/security/AlgorithmParameterGeneratorSpi.java,
* java/security/AlgorithmParameters.java,
* java/security/AlgorithmParametersSpi.java,
* java/security/CodeSource.java,
* java/security/DigestInputStream.java,
* java/security/DigestOutputStream.java,
* java/security/GeneralSecurityException.java,
* java/security/Identity.java,
* java/security/IdentityScope.java,
* java/security/KeyFactory.java,
* java/security/KeyFactorySpi.java,
* java/security/KeyPairGenerator.java,
* java/security/KeyPairGeneratorSpi.java,
* java/security/KeyStore.java,
* java/security/KeyStoreSpi.java,
* java/security/MessageDigest.java,
* java/security/MessageDigestSpi.java,
* java/security/Permission.java,
* java/security/Permissions.java,
* java/security/Policy.java,
* java/security/ProtectionDomain.java,
* java/security/Provider.java,
* java/security/ProviderException.java,
* java/security/SecureClassLoader.java,
* java/security/SecureRandom.java,
* java/security/SecureRandomSpi.java,
* java/security/Security.java,
* java/security/Signature.java,
* java/security/SignatureSpi.java,
* java/security/SignedObject.java,
* java/security/Signer.java,
* java/security/acl/Acl.java,
* java/security/acl/AclEntry.java,
* java/security/acl/Group.java,
* java/security/acl/Owner.java,
* java/security/cert/CRL.java,
* java/security/cert/CRLSelector.java,
* java/security/cert/CertPathBuilder.java,
* java/security/cert/CertPathBuilderResult.java,
* java/security/cert/CertPathValidator.java,
* java/security/cert/CertPathValidatorResult.java,
* java/security/cert/CertPathValidatorSpi.java,
* java/security/cert/CertSelector.java,
* java/security/cert/CertStore.java,
* java/security/cert/CertStoreParameters.java,
* java/security/cert/CertStoreSpi.java,
* java/security/cert/Certificate.java,
* java/security/cert/CertificateFactory.java,
* java/security/cert/CertificateFactorySpi.java,
* java/security/cert/CollectionCertStoreParameters.java,
* java/security/cert/LDAPCertStoreParameters.java,
* java/security/cert/PKIXBuilderParameters.java,
* java/security/cert/PKIXCertPathBuilderResult.java,
* java/security/cert/PKIXCertPathChecker.java,
* java/security/cert/PKIXCertPathValidatorResult.java,
* java/security/cert/PKIXParameters.java,
* java/security/cert/PolicyNode.java,
* java/security/cert/PolicyQualifierInfo.java,
* java/security/cert/X509CRL.java,
* java/security/cert/X509CRLEntry.java,
* java/security/cert/X509CertSelector.java,
* java/security/cert/X509Certificate.java,
* java/security/cert/X509Extension.java,
* java/security/spec/AlgorithmParameterSpec.java,
* java/security/spec/DSAParameterSpec.java,
* java/security/spec/DSAPrivateKeySpec.java,
* java/security/spec/DSAPublicKeySpec.java,
* java/security/spec/EncodedKeySpec.java,
* java/security/spec/InvalidParameterSpecException.java,
* java/security/spec/KeySpec.java,
* java/security/spec/PKCS8EncodedKeySpec.java,
* java/security/spec/PSSParameterSpec.java,
* java/security/spec/RSAKeyGenParameterSpec.java,
* java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java,
* java/security/spec/RSAOtherPrimeInfo.java,
* java/security/spec/RSAPrivateCrtKeySpec.java,
* java/security/spec/RSAPrivateKeySpec.java,
* java/security/spec/RSAPublicKeySpec.java,
* java/security/spec/X509EncodedKeySpec.java,
* java/sql/Array.java,
* java/sql/BatchUpdateException.java,
* java/sql/Blob.java,
* java/sql/CallableStatement.java,
* java/sql/Clob.java,
* java/sql/Connection.java,
* java/sql/DataTruncation.java,
* java/sql/DatabaseMetaData.java,
* java/sql/Date.java,
* java/sql/Driver.java,
* java/sql/DriverManager.java,
* java/sql/DriverPropertyInfo.java,
* java/sql/ParameterMetaData.java,
* java/sql/PreparedStatement.java,
* java/sql/Ref.java,
* java/sql/ResultSet.java,
* java/sql/ResultSetMetaData.java,
* java/sql/SQLData.java,
* java/sql/SQLException.java,
* java/sql/SQLInput.java,
* java/sql/SQLOutput.java,
* java/sql/SQLPermission.java,
* java/sql/SQLWarning.java,
* java/sql/Savepoint.java,
* java/sql/Statement.java,
* java/sql/Struct.java,
* java/sql/Time.java,
* java/sql/Timestamp.java,
* java/sql/Types.java,
* java/text/Annotation.java,
* java/text/AttributedCharacterIterator.java,
* java/text/AttributedString.java,
* java/text/AttributedStringIterator.java,
* java/text/Bidi.java,
* java/text/BreakIterator.java,
* java/text/CharacterIterator.java,
* java/text/ChoiceFormat.java,
* java/text/CollationElementIterator.java,
* java/text/CollationKey.java,
* java/text/Collator.java,
* java/text/DateFormat.java,
* java/text/DateFormatSymbols.java,
* java/text/DecimalFormat.java,
* java/text/DecimalFormatSymbols.java,
* java/text/FieldPosition.java,
* java/text/Format.java,
* java/text/MessageFormat.java,
* java/text/NumberFormat.java,
* java/text/ParsePosition.java,
* java/text/RuleBasedCollator.java,
* java/text/SimpleDateFormat.java,
* java/text/StringCharacterIterator.java,
* java/text/spi/DateFormatProvider.java,
* java/text/spi/NumberFormatProvider.java,
* java/util/AbstractCollection.java,
* java/util/AbstractList.java,
* java/util/AbstractMap.java,
* java/util/AbstractSet.java,
* java/util/ArrayList.java,
* java/util/Arrays.java,
* java/util/BitSet.java,
* java/util/Calendar.java,
* java/util/Collections.java,
* java/util/Currency.java,
* java/util/Date.java,
* java/util/Dictionary.java,
* java/util/DuplicateFormatFlagsException.java,
* java/util/EnumMap.java,
* java/util/EnumSet.java,
* java/util/FormatFlagsConversionMismatchException.java,
* java/util/Formattable.java,
* java/util/FormattableFlags.java,
* java/util/Formatter.java,
* java/util/FormatterClosedException.java,
* java/util/GregorianCalendar.java,
* java/util/HashMap.java,
* java/util/Hashtable.java,
* java/util/IdentityHashMap.java,
* java/util/IllegalFormatCodePointException.java,
* java/util/IllegalFormatConversionException.java,
* java/util/IllegalFormatException.java,
* java/util/IllegalFormatFlagsException.java,
* java/util/IllegalFormatPrecisionException.java,
* java/util/IllegalFormatWidthException.java,
* java/util/InputMismatchException.java,
* java/util/LinkedHashMap.java,
* java/util/LinkedHashSet.java,
* java/util/LinkedList.java,
* java/util/List.java,
* java/util/Locale.java,
* java/util/Map.java,
* java/util/MissingFormatArgumentException.java,
* java/util/MissingFormatWidthException.java,
* java/util/PriorityQueue.java,
* java/util/Properties.java,
* java/util/PropertyPermission.java,
* java/util/PropertyPermissionCollection.java,
* java/util/Random.java,
* java/util/ResourceBundle.java,
* java/util/ServiceConfigurationError.java,
* java/util/ServiceLoader.java,
* java/util/SimpleTimeZone.java,
* java/util/StringTokenizer.java,
* java/util/TimeZone.java,
* java/util/Timer.java,
* java/util/TreeMap.java,
* java/util/TreeSet.java,
* java/util/UUID.java,
* java/util/UnknownFormatConversionException.java,
* java/util/UnknownFormatFlagsException.java,
* java/util/Vector.java,
* java/util/WeakHashMap.java,
* java/util/concurrent/CopyOnWriteArrayList.java,
* java/util/jar/Attributes.java,
* java/util/jar/JarEntry.java,
* java/util/jar/JarFile.java,
* java/util/jar/JarInputStream.java,
* java/util/jar/JarOutputStream.java,
* java/util/jar/Manifest.java,
* java/util/logging/ConsoleHandler.java,
* java/util/logging/ErrorManager.java,
* java/util/logging/FileHandler.java,
* java/util/logging/Formatter.java,
* java/util/logging/Handler.java,
* java/util/logging/Level.java,
* java/util/logging/LogManager.java,
* java/util/logging/LogRecord.java,
* java/util/logging/Logger.java,
* java/util/logging/LoggingMXBean.java,
* java/util/logging/LoggingPermission.java,
* java/util/logging/MemoryHandler.java,
* java/util/logging/SocketHandler.java,
* java/util/logging/StreamHandler.java,
* java/util/logging/XMLFormatter.java,
* java/util/prefs/AbstractPreferences.java,
* java/util/prefs/NodeChangeEvent.java,
* java/util/prefs/NodeChangeListener.java,
* java/util/prefs/PreferenceChangeEvent.java,
* java/util/prefs/PreferenceChangeListener.java,
* java/util/prefs/Preferences.java,
* java/util/prefs/PreferencesFactory.java,
* java/util/regex/MatchResult.java,
* java/util/regex/Pattern.java,
* java/util/regex/PatternSyntaxException.java,
* java/util/spi/LocaleNameProvider.java,
* java/util/spi/TimeZoneNameProvider.java,
* java/util/zip/Adler32.java,
* java/util/zip/CRC32.java,
* java/util/zip/CheckedInputStream.java,
* java/util/zip/CheckedOutputStream.java,
* java/util/zip/Deflater.java,
* java/util/zip/DeflaterEngine.java,
* java/util/zip/DeflaterHuffman.java,
* java/util/zip/DeflaterOutputStream.java,
* java/util/zip/DeflaterPending.java,
* java/util/zip/GZIPInputStream.java,
* java/util/zip/GZIPOutputStream.java,
* java/util/zip/Inflater.java,
* java/util/zip/InflaterDynHeader.java,
* java/util/zip/InflaterHuffmanTree.java,
* java/util/zip/InflaterInputStream.java,
* java/util/zip/OutputWindow.java,
* java/util/zip/PendingBuffer.java,
* java/util/zip/StreamManipulator.java,
* java/util/zip/ZipConstants.java,
* java/util/zip/ZipEntry.java,
* java/util/zip/ZipFile.java,
* java/util/zip/ZipInputStream.java,
* java/util/zip/ZipOutputStream.java,
* javax/accessibility/AccessibleExtendedText.java,
* javax/accessibility/AccessibleRelation.java,
* javax/accessibility/AccessibleRole.java,
* javax/accessibility/AccessibleState.java,
* javax/activation/ActivationDataFlavor.java,
* javax/activation/CommandInfo.java,
* javax/activation/CommandMap.java,
* javax/activation/CommandObject.java,
* javax/activation/DataContentHandler.java,
* javax/activation/DataContentHandlerFactory.java,
* javax/activation/DataHandler.java,
* javax/activation/DataHandlerDataSource.java,
* javax/activation/DataSource.java,
* javax/activation/DataSourceDataContentHandler.java,
* javax/activation/FileDataSource.java,
* javax/activation/FileTypeMap.java,
* javax/activation/MailcapCommandMap.java,
* javax/activation/MimeType.java,
* javax/activation/MimeTypeParameterList.java,
* javax/activation/MimeTypeParseException.java,
* javax/activation/MimetypesFileTypeMap.java,
* javax/activation/ObjectDataContentHandler.java,
* javax/activation/URLDataSource.java,
* javax/activation/UnsupportedDataTypeException.java,
* javax/crypto/Cipher.java,
* javax/crypto/CipherOutputStream.java,
* javax/crypto/ExemptionMechanism.java,
* javax/crypto/KeyAgreement.java,
* javax/crypto/KeyGenerator.java,
* javax/crypto/Mac.java,
* javax/crypto/MacSpi.java,
* javax/crypto/SecretKeyFactory.java,
* javax/crypto/spec/PBEKeySpec.java,
* javax/imageio/IIOImage.java,
* javax/imageio/IIOParam.java,
* javax/imageio/IIOParamController.java,
* javax/imageio/ImageIO.java,
* javax/imageio/ImageReadParam.java,
* javax/imageio/ImageReader.java,
* javax/imageio/ImageTranscoder.java,
* javax/imageio/ImageTypeSpecifier.java,
* javax/imageio/ImageWriteParam.java,
* javax/imageio/ImageWriter.java,
* javax/imageio/event/IIOReadProgressListener.java,
* javax/imageio/event/IIOReadUpdateListener.java,
* javax/imageio/event/IIOWriteProgressListener.java,
* javax/imageio/metadata/IIOInvalidTreeException.java,
* javax/imageio/metadata/IIOMetadata.java,
* javax/imageio/metadata/IIOMetadataFormatImpl.java,
* javax/imageio/metadata/IIOMetadataNode.java,
* javax/imageio/plugins/bmp/BMPImageWriteParam.java,
* javax/imageio/plugins/jpeg/JPEGHuffmanTable.java,
* javax/imageio/spi/IIORegistry.java,
* javax/imageio/spi/ImageReaderSpi.java,
* javax/imageio/spi/ImageWriterSpi.java,
* javax/imageio/spi/RegisterableService.java,
* javax/imageio/spi/ServiceRegistry.java,
* javax/imageio/stream/FileCacheImageInputStream.java,
* javax/imageio/stream/FileCacheImageOutputStream.java,
* javax/imageio/stream/FileImageInputStream.java,
* javax/imageio/stream/FileImageOutputStream.java,
* javax/imageio/stream/ImageInputStream.java,
* javax/imageio/stream/ImageInputStreamImpl.java,
* javax/imageio/stream/ImageOutputStreamImpl.java,
* javax/imageio/stream/MemoryCacheImageInputStream.java,
* javax/imageio/stream/MemoryCacheImageOutputStream.java,
* javax/management/Attribute.java,
* javax/management/AttributeChangeNotification.java,
* javax/management/AttributeChangeNotificationFilter.java,
* javax/management/AttributeList.java,
* javax/management/AttributeNotFoundException.java,
* javax/management/AttributeValueExp.java,
* javax/management/BadAttributeValueExpException.java,
* javax/management/BadBinaryOpValueExpException.java,
* javax/management/BadStringOperationException.java,
* javax/management/DefaultLoaderRepository.java,
* javax/management/Descriptor.java,
* javax/management/DynamicMBean.java,
* javax/management/InstanceAlreadyExistsException.java,
* javax/management/InstanceNotFoundException.java,
* javax/management/IntrospectionException.java,
* javax/management/InvalidApplicationException.java,
* javax/management/InvalidAttributeValueException.java,
* javax/management/JMException.java,
* javax/management/JMRuntimeException.java,
* javax/management/JMX.java,
* javax/management/ListenerNotFoundException.java,
* javax/management/MBeanAttributeInfo.java,
* javax/management/MBeanConstructorInfo.java,
* javax/management/MBeanException.java,
* javax/management/MBeanFeatureInfo.java,
* javax/management/MBeanInfo.java,
* javax/management/MBeanNotificationInfo.java,
* javax/management/MBeanOperationInfo.java,
* javax/management/MBeanParameterInfo.java,
* javax/management/MBeanPermission.java,
* javax/management/MBeanRegistrationException.java,
* javax/management/MBeanServer.java,
* javax/management/MBeanServerBuilder.java,
* javax/management/MBeanServerConnection.java,
* javax/management/MBeanServerDelegate.java,
* javax/management/MBeanServerFactory.java,
* javax/management/MBeanServerInvocationHandler.java,
* javax/management/MBeanServerNotification.java,
* javax/management/MBeanServerPermission.java,
* javax/management/MBeanTrustPermission.java,
* javax/management/MalformedObjectNameException.java,
* javax/management/NotCompliantMBeanException.java,
* javax/management/Notification.java,
* javax/management/NotificationBroadcaster.java,
* javax/management/NotificationBroadcasterSupport.java,
* javax/management/NotificationEmitter.java,
* javax/management/NotificationFilter.java,
* javax/management/NotificationFilterSupport.java,
* javax/management/NotificationListener.java,
* javax/management/ObjectInstance.java,
* javax/management/ObjectName.java,
* javax/management/OperationsException.java,
* javax/management/PersistentMBean.java,
* javax/management/Query.java,
* javax/management/QueryEval.java,
* javax/management/QueryExp.java,
* javax/management/ReflectionException.java,
* javax/management/RuntimeErrorException.java,
* javax/management/RuntimeMBeanException.java,
* javax/management/RuntimeOperationsException.java,
* javax/management/ServiceNotFoundException.java,
* javax/management/StandardMBean.java,
* javax/management/StringValueExp.java,
* javax/management/ValueExp.java,
* javax/management/loading/ClassLoaderRepository.java,
* javax/management/openmbean/ArrayType.java,
* javax/management/openmbean/CompositeData.java,
* javax/management/openmbean/CompositeDataInvocationHandler.java,
* javax/management/openmbean/CompositeDataSupport.java,
* javax/management/openmbean/CompositeType.java,
* javax/management/openmbean/InvalidKeyException.java,
* javax/management/openmbean/InvalidOpenTypeException.java,
* javax/management/openmbean/KeyAlreadyExistsException.java,
* javax/management/openmbean/OpenDataException.java,
* javax/management/openmbean/OpenMBeanAttributeInfo.java,
* javax/management/openmbean/OpenMBeanAttributeInfoSupport.java,
* javax/management/openmbean/OpenMBeanConstructorInfo.java,
* javax/management/openmbean/OpenMBeanConstructorInfoSupport.java,
* javax/management/openmbean/OpenMBeanInfo.java,
* javax/management/openmbean/OpenMBeanInfoSupport.java,
* javax/management/openmbean/OpenMBeanOperationInfo.java,
* javax/management/openmbean/OpenMBeanOperationInfoSupport.java,
* javax/management/openmbean/OpenMBeanParameterInfo.java,
* javax/management/openmbean/OpenMBeanParameterInfoSupport.java,
* javax/management/openmbean/OpenType.java,
* javax/management/openmbean/SimpleType.java,
* javax/management/openmbean/TabularData.java,
* javax/management/openmbean/TabularDataSupport.java,
* javax/management/openmbean/TabularType.java,
* javax/management/remote/NotificationResult.java,
* javax/management/remote/TargetedNotification.java,
* javax/management/remote/rmi/RMIConnection.java,
* javax/naming/AuthenticationException.java,
* javax/naming/AuthenticationNotSupportedException.java,
* javax/naming/BinaryRefAddr.java,
* javax/naming/Binding.java,
* javax/naming/CannotProceedException.java,
* javax/naming/CommunicationException.java,
* javax/naming/CompositeName.java,
* javax/naming/CompoundName.java,
* javax/naming/ConfigurationException.java,
* javax/naming/Context.java,
* javax/naming/ContextNotEmptyException.java,
* javax/naming/InitialContext.java,
* javax/naming/InsufficientResourcesException.java,
* javax/naming/InterruptedNamingException.java,
* javax/naming/InvalidNameException.java,
* javax/naming/LimitExceededException.java,
* javax/naming/LinkException.java,
* javax/naming/LinkLoopException.java,
* javax/naming/MalformedLinkException.java,
* javax/naming/Name.java,
* javax/naming/NameAlreadyBoundException.java,
* javax/naming/NameClassPair.java,
* javax/naming/NameNotFoundException.java,
* javax/naming/NameParser.java,
* javax/naming/NamingEnumeration.java,
* javax/naming/NamingException.java,
* javax/naming/NamingSecurityException.java,
* javax/naming/NoInitialContextException.java,
* javax/naming/NoPermissionException.java,
* javax/naming/NotContextException.java,
* javax/naming/PartialResultException.java,
* javax/naming/RefAddr.java,
* javax/naming/Reference.java,
* javax/naming/Referenceable.java,
* javax/naming/ReferralException.java,
* javax/naming/ServiceUnavailableException.java,
* javax/naming/SizeLimitExceededException.java,
* javax/naming/StringRefAddr.java,
* javax/naming/TimeLimitExceededException.java,
* javax/naming/directory/AttributeInUseException.java,
* javax/naming/directory/Attributes.java,
* javax/naming/directory/BasicAttribute.java,
* javax/naming/directory/BasicAttributes.java,
* javax/naming/directory/InitialDirContext.java,
* javax/naming/directory/ModificationItem.java,
* javax/naming/directory/SearchControls.java,
* javax/naming/directory/SearchResult.java,
* javax/naming/event/EventContext.java,
* javax/naming/event/NamespaceChangeListener.java,
* javax/naming/event/NamingEvent.java,
* javax/naming/event/NamingExceptionEvent.java,
* javax/naming/event/NamingListener.java,
* javax/naming/event/ObjectChangeListener.java,
* javax/naming/ldap/Control.java,
* javax/naming/ldap/ControlFactory.java,
* javax/naming/ldap/ExtendedRequest.java,
* javax/naming/ldap/ExtendedResponse.java,
* javax/naming/ldap/HasControls.java,
* javax/naming/ldap/InitialLdapContext.java,
* javax/naming/ldap/LdapContext.java,
* javax/naming/ldap/LdapReferralException.java,
* javax/naming/ldap/StartTlsRequest.java,
* javax/naming/ldap/UnsolicitedNotification.java,
* javax/naming/ldap/UnsolicitedNotificationEvent.java,
* javax/naming/ldap/UnsolicitedNotificationListener.java,
* javax/naming/spi/DirObjectFactory.java,
* javax/naming/spi/DirStateFactory.java,
* javax/naming/spi/DirectoryManager.java,
* javax/naming/spi/InitialContextFactory.java,
* javax/naming/spi/InitialContextFactoryBuilder.java,
* javax/naming/spi/NamingManager.java,
* javax/naming/spi/ObjectFactory.java,
* javax/naming/spi/ObjectFactoryBuilder.java,
* javax/naming/spi/ResolveResult.java,
* javax/naming/spi/Resolver.java,
* javax/naming/spi/StateFactory.java,
* javax/net/ssl/CertPathTrustManagerParameters.java,
* javax/net/ssl/KeyManagerFactory.java,
* javax/net/ssl/KeyStoreBuilderParameters.java,
* javax/net/ssl/SSLContext.java,
* javax/net/ssl/SSLEngine.java,
* javax/net/ssl/SSLEngineResult.java,
* javax/net/ssl/SSLException.java,
* javax/net/ssl/TrustManagerFactory.java,
* javax/net/ssl/X509ExtendedKeyManager.java,
* javax/print/AttributeException.java,
* javax/print/CancelablePrintJob.java,
* javax/print/Doc.java,
* javax/print/DocFlavor.java,
* javax/print/DocPrintJob.java,
* javax/print/FlavorException.java,
* javax/print/MultiDoc.java,
* javax/print/MultiDocPrintJob.java,
* javax/print/MultiDocPrintService.java,
* javax/print/PrintException.java,
* javax/print/PrintService.java,
* javax/print/PrintServiceLookup.java,
* javax/print/ServiceUI.java,
* javax/print/ServiceUIFactory.java,
* javax/print/SimpleDoc.java,
* javax/print/StreamPrintService.java,
* javax/print/StreamPrintServiceFactory.java,
* javax/print/URIException.java,
* javax/print/attribute/Attribute.java,
* javax/print/attribute/AttributeSet.java,
* javax/print/attribute/AttributeSetUtilities.java,
* javax/print/attribute/DateTimeSyntax.java,
* javax/print/attribute/DocAttribute.java,
* javax/print/attribute/DocAttributeSet.java,
* javax/print/attribute/EnumSyntax.java,
* javax/print/attribute/HashAttributeSet.java,
* javax/print/attribute/HashDocAttributeSet.java,
* javax/print/attribute/HashPrintJobAttributeSet.java,
* javax/print/attribute/HashPrintRequestAttributeSet.java,
* javax/print/attribute/HashPrintServiceAttributeSet.java,
* javax/print/attribute/IntegerSyntax.java,
* javax/print/attribute/PrintJobAttribute.java,
* javax/print/attribute/PrintJobAttributeSet.java,
* javax/print/attribute/PrintRequestAttribute.java,
* javax/print/attribute/PrintRequestAttributeSet.java,
* javax/print/attribute/PrintServiceAttribute.java,
* javax/print/attribute/PrintServiceAttributeSet.java,
* javax/print/attribute/ResolutionSyntax.java,
* javax/print/attribute/SetOfIntegerSyntax.java,
* javax/print/attribute/Size2DSyntax.java,
* javax/print/attribute/SupportedValuesAttribute.java,
* javax/print/attribute/TextSyntax.java,
* javax/print/attribute/URISyntax.java,
* javax/print/attribute/UnmodifiableSetException.java,
* javax/print/attribute/standard/Chromaticity.java,
* javax/print/attribute/standard/ColorSupported.java,
* javax/print/attribute/standard/Compression.java,
* javax/print/attribute/standard/Copies.java,
* javax/print/attribute/standard/CopiesSupported.java,
* javax/print/attribute/standard/DateTimeAtCompleted.java,
* javax/print/attribute/standard/DateTimeAtCreation.java,
* javax/print/attribute/standard/DateTimeAtProcessing.java,
* javax/print/attribute/standard/Destination.java,
* javax/print/attribute/standard/DocumentName.java,
* javax/print/attribute/standard/Fidelity.java,
* javax/print/attribute/standard/Finishings.java,
* javax/print/attribute/standard/JobHoldUntil.java,
* javax/print/attribute/standard/JobImpressions.java,
* javax/print/attribute/standard/JobImpressionsCompleted.java,
* javax/print/attribute/standard/JobImpressionsSupported.java,
* javax/print/attribute/standard/JobKOctets.java,
* javax/print/attribute/standard/JobKOctetsProcessed.java,
* javax/print/attribute/standard/JobKOctetsSupported.java,
* javax/print/attribute/standard/JobMediaSheets.java,
* javax/print/attribute/standard/JobMediaSheetsCompleted.java,
* javax/print/attribute/standard/JobMediaSheetsSupported.java,
* javax/print/attribute/standard/JobMessageFromOperator.java,
* javax/print/attribute/standard/JobName.java,
* javax/print/attribute/standard/JobOriginatingUserName.java,
* javax/print/attribute/standard/JobPriority.java,
* javax/print/attribute/standard/JobPrioritySupported.java,
* javax/print/attribute/standard/JobSheets.java,
* javax/print/attribute/standard/JobState.java,
* javax/print/attribute/standard/JobStateReason.java,
* javax/print/attribute/standard/JobStateReasons.java,
* javax/print/attribute/standard/Media.java,
* javax/print/attribute/standard/MediaName.java,
* javax/print/attribute/standard/MediaPrintableArea.java,
* javax/print/attribute/standard/MediaSize.java,
* javax/print/attribute/standard/MediaSizeName.java,
* javax/print/attribute/standard/MediaTray.java,
* javax/print/attribute/standard/MultipleDocumentHandling.java,
* javax/print/attribute/standard/NumberOfDocuments.java,
* javax/print/attribute/standard/NumberOfInterveningJobs.java,
* javax/print/attribute/standard/NumberUp.java,
* javax/print/attribute/standard/NumberUpSupported.java,
* javax/print/attribute/standard/OrientationRequested.java,
* javax/print/attribute/standard/OutputDeviceAssigned.java,
* javax/print/attribute/standard/PDLOverrideSupported.java,
* javax/print/attribute/standard/PageRanges.java,
* javax/print/attribute/standard/PagesPerMinute.java,
* javax/print/attribute/standard/PagesPerMinuteColor.java,
* javax/print/attribute/standard/PresentationDirection.java,
* javax/print/attribute/standard/PrintQuality.java,
* javax/print/attribute/standard/PrinterInfo.java,
* javax/print/attribute/standard/PrinterIsAcceptingJobs.java,
* javax/print/attribute/standard/PrinterLocation.java,
* javax/print/attribute/standard/PrinterMakeAndModel.java,
* javax/print/attribute/standard/PrinterMessageFromOperator.java,
* javax/print/attribute/standard/PrinterMoreInfo.java,
* javax/print/attribute/standard/PrinterMoreInfoManufacturer.java,
* javax/print/attribute/standard/PrinterName.java,
* javax/print/attribute/standard/PrinterResolution.java,
* javax/print/attribute/standard/PrinterState.java,
* javax/print/attribute/standard/PrinterStateReason.java,
* javax/print/attribute/standard/PrinterStateReasons.java,
* javax/print/attribute/standard/PrinterURI.java,
* javax/print/attribute/standard/QueuedJobCount.java,
* javax/print/attribute/standard/ReferenceUriSchemesSupported.java,
* javax/print/attribute/standard/RequestingUserName.java,
* javax/print/attribute/standard/Severity.java,
* javax/print/attribute/standard/SheetCollate.java,
* javax/print/attribute/standard/Sides.java,
* javax/print/event/PrintEvent.java,
* javax/print/event/PrintJobAdapter.java,
* javax/print/event/PrintJobAttributeEvent.java,
* javax/print/event/PrintJobAttributeListener.java,
* javax/print/event/PrintJobEvent.java,
* javax/print/event/PrintJobListener.java,
* javax/print/event/PrintServiceAttributeEvent.java,
* javax/print/event/PrintServiceAttributeListener.java,
* javax/rmi/CORBA/ClassDesc.java,
* javax/rmi/CORBA/PortableRemoteObjectDelegate.java,
* javax/rmi/CORBA/Stub.java,
* javax/rmi/CORBA/StubDelegate.java,
* javax/rmi/CORBA/Tie.java,
* javax/rmi/CORBA/Util.java,
* javax/rmi/CORBA/UtilDelegate.java,
* javax/rmi/CORBA/ValueHandler.java,
* javax/rmi/CORBA/ValueHandlerMultiFormat.java,
* javax/rmi/PortableRemoteObject.java,
* javax/rmi/ssl/SslRMIClientSocketFactory.java,
* javax/rmi/ssl/SslRMIServerSocketFactory.java,
* javax/security/auth/Subject.java,
* javax/security/auth/callback/ChoiceCallback.java,
* javax/security/auth/callback/ConfirmationCallback.java,
* javax/security/auth/callback/NameCallback.java,
* javax/security/auth/callback/PasswordCallback.java,
* javax/security/auth/callback/TextInputCallback.java,
* javax/security/auth/callback/TextOutputCallback.java,
* javax/security/auth/kerberos/DelegationPermission.java,
* javax/security/auth/kerberos/KerberosKey.java,
* javax/security/auth/kerberos/KerberosPrincipal.java,
* javax/security/auth/kerberos/ServicePermission.java,
* javax/security/auth/login/AccountNotFoundException.java,
* javax/security/auth/login/AppConfigurationEntry.java,
* javax/security/auth/login/LoginContext.java,
* javax/security/sasl/Sasl.java,
* javax/sound/midi/ControllerEventListener.java,
* javax/sound/midi/Instrument.java,
* javax/sound/midi/InvalidMidiDataException.java,
* javax/sound/midi/MetaEventListener.java,
* javax/sound/midi/MetaMessage.java,
* javax/sound/midi/MidiChannel.java,
* javax/sound/midi/MidiDevice.java,
* javax/sound/midi/MidiEvent.java,
* javax/sound/midi/MidiFileFormat.java,
* javax/sound/midi/MidiMessage.java,
* javax/sound/midi/MidiSystem.java,
* javax/sound/midi/MidiUnavailableException.java,
* javax/sound/midi/Patch.java,
* javax/sound/midi/Receiver.java,
* javax/sound/midi/Sequence.java,
* javax/sound/midi/Sequencer.java,
* javax/sound/midi/ShortMessage.java,
* javax/sound/midi/Soundbank.java,
* javax/sound/midi/SoundbankResource.java,
* javax/sound/midi/Synthesizer.java,
* javax/sound/midi/SysexMessage.java,
* javax/sound/midi/Track.java,
* javax/sound/midi/Transmitter.java,
* javax/sound/midi/VoiceStatus.java,
* javax/sound/midi/spi/MidiDeviceProvider.java,
* javax/sound/midi/spi/MidiFileReader.java,
* javax/sound/midi/spi/MidiFileWriter.java,
* javax/sound/midi/spi/SoundbankReader.java,
* javax/sound/sampled/AudioFileFormat.java,
* javax/sound/sampled/AudioFormat.java,
* javax/sound/sampled/AudioInputStream.java,
* javax/sound/sampled/AudioPermission.java,
* javax/sound/sampled/AudioSystem.java,
* javax/sound/sampled/BooleanControl.java,
* javax/sound/sampled/Clip.java,
* javax/sound/sampled/CompoundControl.java,
* javax/sound/sampled/DataLine.java,
* javax/sound/sampled/EnumControl.java,
* javax/sound/sampled/FloatControl.java,
* javax/sound/sampled/Line.java,
* javax/sound/sampled/LineEvent.java,
* javax/sound/sampled/LineUnavailableException.java,
* javax/sound/sampled/Mixer.java,
* javax/sound/sampled/Port.java,
* javax/sound/sampled/ReverbType.java,
* javax/sound/sampled/UnsupportedAudioFileException.java,
* javax/sound/sampled/spi/AudioFileReader.java,
* javax/sound/sampled/spi/AudioFileWriter.java,
* javax/sound/sampled/spi/FormatConversionProvider.java,
* javax/sql/ConnectionEvent.java,
* javax/sql/ConnectionEventListener.java,
* javax/sql/ConnectionPoolDataSource.java,
* javax/sql/DataSource.java,
* javax/sql/PooledConnection.java,
* javax/sql/RowSet.java,
* javax/sql/RowSetEvent.java,
* javax/sql/RowSetInternal.java,
* javax/sql/RowSetListener.java,
* javax/sql/RowSetMetaData.java,
* javax/sql/RowSetReader.java,
* javax/sql/RowSetWriter.java,
* javax/sql/XAConnection.java,
* javax/sql/XADataSource.java,
* javax/swing/AbstractAction.java,
* javax/swing/AbstractButton.java,
* javax/swing/AbstractCellEditor.java,
* javax/swing/AbstractListModel.java,
* javax/swing/AbstractSpinnerModel.java,
* javax/swing/Action.java,
* javax/swing/BorderFactory.java,
* javax/swing/BoundedRangeModel.java,
* javax/swing/Box.java,
* javax/swing/BoxLayout.java,
* javax/swing/ButtonGroup.java,
* javax/swing/ButtonModel.java,
* javax/swing/CellEditor.java,
* javax/swing/CellRendererPane.java,
* javax/swing/ComboBoxModel.java,
* javax/swing/ComponentInputMap.java,
* javax/swing/DebugGraphics.java,
* javax/swing/DefaultBoundedRangeModel.java,
* javax/swing/DefaultButtonModel.java,
* javax/swing/DefaultCellEditor.java,
* javax/swing/DefaultComboBoxModel.java,
* javax/swing/DefaultDesktopManager.java,
* javax/swing/DefaultFocusManager.java,
* javax/swing/DefaultListModel.java,
* javax/swing/DefaultListSelectionModel.java,
* javax/swing/DefaultSingleSelectionModel.java,
* javax/swing/FocusManager.java,
* javax/swing/GrayFilter.java,
* javax/swing/Icon.java,
* javax/swing/ImageIcon.java,
* javax/swing/InputMap.java,
* javax/swing/InternalFrameFocusTraversalPolicy.java,
* javax/swing/JApplet.java,
* javax/swing/JButton.java,
* javax/swing/JCheckBox.java,
* javax/swing/JCheckBoxMenuItem.java,
* javax/swing/JComboBox.java,
* javax/swing/JComponent.java,
* javax/swing/JDesktopPane.java,
* javax/swing/JDialog.java,
* javax/swing/JEditorPane.java,
* javax/swing/JFileChooser.java,
* javax/swing/JFormattedTextField.java,
* javax/swing/JFrame.java,
* javax/swing/JInternalFrame.java,
* javax/swing/JLabel.java,
* javax/swing/JLayeredPane.java,
* javax/swing/JList.java,
* javax/swing/JMenu.java,
* javax/swing/JMenuBar.java,
* javax/swing/JMenuItem.java,
* javax/swing/JOptionPane.java,
* javax/swing/JPanel.java,
* javax/swing/JPasswordField.java,
* javax/swing/JPopupMenu.java,
* javax/swing/JProgressBar.java,
* javax/swing/JRadioButton.java,
* javax/swing/JRadioButtonMenuItem.java,
* javax/swing/JRootPane.java,
* javax/swing/JScrollBar.java,
* javax/swing/JScrollPane.java,
* javax/swing/JSeparator.java,
* javax/swing/JSlider.java,
* javax/swing/JSpinner.java,
* javax/swing/JSplitPane.java,
* javax/swing/JTabbedPane.java,
* javax/swing/JTable.java,
* javax/swing/JTextArea.java,
* javax/swing/JTextField.java,
* javax/swing/JTextPane.java,
* javax/swing/JToggleButton.java,
* javax/swing/JToolBar.java,
* javax/swing/JToolTip.java,
* javax/swing/JTree.java,
* javax/swing/JViewport.java,
* javax/swing/JWindow.java,
* javax/swing/KeyStroke.java,
* javax/swing/KeyboardManager.java,
* javax/swing/LayoutFocusTraversalPolicy.java,
* javax/swing/ListCellRenderer.java,
* javax/swing/ListSelectionModel.java,
* javax/swing/LookAndFeel.java,
* javax/swing/MenuSelectionManager.java,
* javax/swing/OverlayLayout.java,
* javax/swing/Popup.java,
* javax/swing/PopupFactory.java,
* javax/swing/ProgressMonitor.java,
* javax/swing/ProgressMonitorInputStream.java,
* javax/swing/Renderer.java,
* javax/swing/RepaintManager.java,
* javax/swing/ScrollPaneLayout.java,
* javax/swing/Scrollable.java,
* javax/swing/SingleSelectionModel.java,
* javax/swing/SizeRequirements.java,
* javax/swing/SizeSequence.java,
* javax/swing/SortingFocusTraversalPolicy.java,
* javax/swing/SpinnerDateModel.java,
* javax/swing/SpinnerListModel.java,
* javax/swing/SpinnerModel.java,
* javax/swing/SpinnerNumberModel.java,
* javax/swing/Spring.java,
* javax/swing/SpringLayout.java,
* javax/swing/SwingConstants.java,
* javax/swing/SwingUtilities.java,
* javax/swing/Timer.java,
* javax/swing/ToolTipManager.java,
* javax/swing/TransferHandler.java,
* javax/swing/UIDefaults.java,
* javax/swing/UIManager.java,
* javax/swing/UnsupportedLookAndFeelException.java,
* javax/swing/ViewportLayout.java,
* javax/swing/WindowConstants.java,
* javax/swing/border/AbstractBorder.java,
* javax/swing/border/BevelBorder.java,
* javax/swing/border/Border.java,
* javax/swing/border/CompoundBorder.java,
* javax/swing/border/EmptyBorder.java,
* javax/swing/border/EtchedBorder.java,
* javax/swing/border/LineBorder.java,
* javax/swing/border/MatteBorder.java,
* javax/swing/border/SoftBevelBorder.java,
* javax/swing/border/TitledBorder.java,
* javax/swing/colorchooser/AbstractColorChooserPanel.java,
* javax/swing/colorchooser/ColorChooserComponentFactory.java,
* javax/swing/colorchooser/ColorSelectionModel.java,
* javax/swing/colorchooser/DefaultColorSelectionModel.java,
* javax/swing/colorchooser/DefaultHSBChooserPanel.java,
* javax/swing/colorchooser/DefaultRGBChooserPanel.java,
* javax/swing/colorchooser/DefaultSwatchChooserPanel.java,
* javax/swing/event/AncestorEvent.java,
* javax/swing/event/AncestorListener.java,
* javax/swing/event/CaretEvent.java,
* javax/swing/event/CaretListener.java,
* javax/swing/event/CellEditorListener.java,
* javax/swing/event/ChangeEvent.java,
* javax/swing/event/ChangeListener.java,
* javax/swing/event/DocumentEvent.java,
* javax/swing/event/DocumentListener.java,
* javax/swing/event/EventListenerList.java,
* javax/swing/event/HyperlinkEvent.java,
* javax/swing/event/HyperlinkListener.java,
* javax/swing/event/InternalFrameAdapter.java,
* javax/swing/event/InternalFrameEvent.java,
* javax/swing/event/InternalFrameListener.java,
* javax/swing/event/ListDataEvent.java,
* javax/swing/event/ListDataListener.java,
* javax/swing/event/ListSelectionEvent.java,
* javax/swing/event/ListSelectionListener.java,
* javax/swing/event/MenuDragMouseEvent.java,
* javax/swing/event/MenuDragMouseListener.java,
* javax/swing/event/MenuEvent.java,
* javax/swing/event/MenuKeyEvent.java,
* javax/swing/event/MenuKeyListener.java,
* javax/swing/event/MenuListener.java,
* javax/swing/event/MouseInputListener.java,
* javax/swing/event/PopupMenuEvent.java,
* javax/swing/event/PopupMenuListener.java,
* javax/swing/event/SwingPropertyChangeSupport.java,
* javax/swing/event/TableColumnModelEvent.java,
* javax/swing/event/TableColumnModelListener.java,
* javax/swing/event/TableModelEvent.java,
* javax/swing/event/TableModelListener.java,
* javax/swing/event/TreeExpansionEvent.java,
* javax/swing/event/TreeExpansionListener.java,
* javax/swing/event/TreeModelEvent.java,
* javax/swing/event/TreeModelListener.java,
* javax/swing/event/TreeSelectionEvent.java,
* javax/swing/event/TreeSelectionListener.java,
* javax/swing/event/TreeWillExpandListener.java,
* javax/swing/event/UndoableEditEvent.java,
* javax/swing/filechooser/FileFilter.java,
* javax/swing/filechooser/FileSystemView.java,
* javax/swing/filechooser/FileView.java,
* javax/swing/filechooser/UnixFileSystemView.java,
* javax/swing/plaf/BorderUIResource.java,
* javax/swing/plaf/ColorChooserUI.java,
* javax/swing/plaf/ColorUIResource.java,
* javax/swing/plaf/ComboBoxUI.java,
* javax/swing/plaf/ComponentInputMapUIResource.java,
* javax/swing/plaf/ComponentUI.java,
* javax/swing/plaf/FileChooserUI.java,
* javax/swing/plaf/IconUIResource.java,
* javax/swing/plaf/SplitPaneUI.java,
* javax/swing/plaf/TabbedPaneUI.java,
* javax/swing/plaf/TextUI.java,
* javax/swing/plaf/UIResource.java,
* javax/swing/plaf/basic/BasicArrowButton.java,
* javax/swing/plaf/basic/BasicBorders.java,
* javax/swing/plaf/basic/BasicButtonListener.java,
* javax/swing/plaf/basic/BasicButtonUI.java,
* javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java,
* javax/swing/plaf/basic/BasicCheckBoxUI.java,
* javax/swing/plaf/basic/BasicColorChooserUI.java,
* javax/swing/plaf/basic/BasicComboBoxEditor.java,
* javax/swing/plaf/basic/BasicComboBoxRenderer.java,
* javax/swing/plaf/basic/BasicComboBoxUI.java,
* javax/swing/plaf/basic/BasicComboPopup.java,
* javax/swing/plaf/basic/BasicDesktopIconUI.java,
* javax/swing/plaf/basic/BasicDesktopPaneUI.java,
* javax/swing/plaf/basic/BasicDirectoryModel.java,
* javax/swing/plaf/basic/BasicEditorPaneUI.java,
* javax/swing/plaf/basic/BasicFileChooserUI.java,
* javax/swing/plaf/basic/BasicFormattedTextFieldUI.java,
* javax/swing/plaf/basic/BasicGraphicsUtils.java,
* javax/swing/plaf/basic/BasicHTML.java,
* javax/swing/plaf/basic/BasicIconFactory.java,
* javax/swing/plaf/basic/BasicInternalFrameTitlePane.java,
* javax/swing/plaf/basic/BasicInternalFrameUI.java,
* javax/swing/plaf/basic/BasicLabelUI.java,
* javax/swing/plaf/basic/BasicListUI.java,
* javax/swing/plaf/basic/BasicLookAndFeel.java,
* javax/swing/plaf/basic/BasicMenuBarUI.java,
* javax/swing/plaf/basic/BasicMenuItemUI.java,
* javax/swing/plaf/basic/BasicMenuUI.java,
* javax/swing/plaf/basic/BasicOptionPaneUI.java,
* javax/swing/plaf/basic/BasicPanelUI.java,
* javax/swing/plaf/basic/BasicPasswordFieldUI.java,
* javax/swing/plaf/basic/BasicPopupMenuUI.java,
* javax/swing/plaf/basic/BasicProgressBarUI.java,
* javax/swing/plaf/basic/BasicRadioButtonUI.java,
* javax/swing/plaf/basic/BasicRootPaneUI.java,
* javax/swing/plaf/basic/BasicScrollBarUI.java,
* javax/swing/plaf/basic/BasicScrollPaneUI.java,
* javax/swing/plaf/basic/BasicSeparatorUI.java,
* javax/swing/plaf/basic/BasicSliderUI.java,
* javax/swing/plaf/basic/BasicSpinnerUI.java,
* javax/swing/plaf/basic/BasicSplitPaneDivider.java,
* javax/swing/plaf/basic/BasicSplitPaneUI.java,
* javax/swing/plaf/basic/BasicTabbedPaneUI.java,
* javax/swing/plaf/basic/BasicTableHeaderUI.java,
* javax/swing/plaf/basic/BasicTableUI.java,
* javax/swing/plaf/basic/BasicTextAreaUI.java,
* javax/swing/plaf/basic/BasicTextFieldUI.java,
* javax/swing/plaf/basic/BasicTextPaneUI.java,
* javax/swing/plaf/basic/BasicTextUI.java,
* javax/swing/plaf/basic/BasicToggleButtonUI.java,
* javax/swing/plaf/basic/BasicToolBarUI.java,
* javax/swing/plaf/basic/BasicToolTipUI.java,
* javax/swing/plaf/basic/BasicTreeUI.java,
* javax/swing/plaf/basic/BasicViewportUI.java,
* javax/swing/plaf/metal/DefaultMetalTheme.java,
* javax/swing/plaf/metal/MetalBorders.java,
* javax/swing/plaf/metal/MetalButtonListener.java,
* javax/swing/plaf/metal/MetalButtonUI.java,
* javax/swing/plaf/metal/MetalCheckBoxIcon.java,
* javax/swing/plaf/metal/MetalCheckBoxUI.java,
* javax/swing/plaf/metal/MetalComboBoxButton.java,
* javax/swing/plaf/metal/MetalComboBoxEditor.java,
* javax/swing/plaf/metal/MetalComboBoxIcon.java,
* javax/swing/plaf/metal/MetalComboBoxUI.java,
* javax/swing/plaf/metal/MetalFileChooserUI.java,
* javax/swing/plaf/metal/MetalIconFactory.java,
* javax/swing/plaf/metal/MetalInternalFrameTitlePane.java,
* javax/swing/plaf/metal/MetalInternalFrameUI.java,
* javax/swing/plaf/metal/MetalLabelUI.java,
* javax/swing/plaf/metal/MetalLookAndFeel.java,
* javax/swing/plaf/metal/MetalMenuBarUI.java,
* javax/swing/plaf/metal/MetalProgressBarUI.java,
* javax/swing/plaf/metal/MetalRadioButtonUI.java,
* javax/swing/plaf/metal/MetalRootPaneUI.java,
* javax/swing/plaf/metal/MetalScrollBarUI.java,
* javax/swing/plaf/metal/MetalScrollButton.java,
* javax/swing/plaf/metal/MetalScrollPaneUI.java,
* javax/swing/plaf/metal/MetalSeparatorUI.java,
* javax/swing/plaf/metal/MetalSliderUI.java,
* javax/swing/plaf/metal/MetalSplitPaneDivider.java,
* javax/swing/plaf/metal/MetalSplitPaneUI.java,
* javax/swing/plaf/metal/MetalTabbedPaneUI.java,
* javax/swing/plaf/metal/MetalTextFieldUI.java,
* javax/swing/plaf/metal/MetalTheme.java,
* javax/swing/plaf/metal/MetalToggleButtonUI.java,
* javax/swing/plaf/metal/MetalToolBarUI.java,
* javax/swing/plaf/metal/MetalToolTipUI.java,
* javax/swing/plaf/metal/MetalTreeUI.java,
* javax/swing/plaf/metal/MetalUtils.java,
* javax/swing/plaf/metal/OceanTheme.java,
* javax/swing/plaf/multi/MultiButtonUI.java,
* javax/swing/plaf/multi/MultiColorChooserUI.java,
* javax/swing/plaf/multi/MultiComboBoxUI.java,
* javax/swing/plaf/multi/MultiDesktopIconUI.java,
* javax/swing/plaf/multi/MultiDesktopPaneUI.java,
* javax/swing/plaf/multi/MultiFileChooserUI.java,
* javax/swing/plaf/multi/MultiInternalFrameUI.java,
* javax/swing/plaf/multi/MultiLabelUI.java,
* javax/swing/plaf/multi/MultiListUI.java,
* javax/swing/plaf/multi/MultiLookAndFeel.java,
* javax/swing/plaf/multi/MultiMenuBarUI.java,
* javax/swing/plaf/multi/MultiMenuItemUI.java,
* javax/swing/plaf/multi/MultiOptionPaneUI.java,
* javax/swing/plaf/multi/MultiPanelUI.java,
* javax/swing/plaf/multi/MultiPopupMenuUI.java,
* javax/swing/plaf/multi/MultiProgressBarUI.java,
* javax/swing/plaf/multi/MultiRootPaneUI.java,
* javax/swing/plaf/multi/MultiScrollBarUI.java,
* javax/swing/plaf/multi/MultiScrollPaneUI.java,
* javax/swing/plaf/multi/MultiSeparatorUI.java,
* javax/swing/plaf/multi/MultiSliderUI.java,
* javax/swing/plaf/multi/MultiSpinnerUI.java,
* javax/swing/plaf/multi/MultiSplitPaneUI.java,
* javax/swing/plaf/multi/MultiTabbedPaneUI.java,
* javax/swing/plaf/multi/MultiTableHeaderUI.java,
* javax/swing/plaf/multi/MultiTableUI.java,
* javax/swing/plaf/multi/MultiTextUI.java,
* javax/swing/plaf/multi/MultiToolBarUI.java,
* javax/swing/plaf/multi/MultiToolTipUI.java,
* javax/swing/plaf/multi/MultiTreeUI.java,
* javax/swing/plaf/multi/MultiViewportUI.java,
* javax/swing/plaf/synth/SynthGraphicsUtils.java,
* javax/swing/plaf/synth/SynthLookAndFeel.java,
* javax/swing/plaf/synth/SynthPainter.java,
* javax/swing/table/AbstractTableModel.java,
* javax/swing/table/DefaultTableCellRenderer.java,
* javax/swing/table/DefaultTableColumnModel.java,
* javax/swing/table/DefaultTableModel.java,
* javax/swing/table/JTableHeader.java,
* javax/swing/table/TableCellEditor.java,
* javax/swing/table/TableCellRenderer.java,
* javax/swing/table/TableColumn.java,
* javax/swing/table/TableColumnModel.java,
* javax/swing/table/TableModel.java,
* javax/swing/text/AbstractDocument.java,
* javax/swing/text/AbstractWriter.java,
* javax/swing/text/AsyncBoxView.java,
* javax/swing/text/AttributeSet.java,
* javax/swing/text/BoxView.java,
* javax/swing/text/Caret.java,
* javax/swing/text/ComponentView.java,
* javax/swing/text/CompositeView.java,
* javax/swing/text/DefaultCaret.java,
* javax/swing/text/DefaultEditorKit.java,
* javax/swing/text/DefaultFormatter.java,
* javax/swing/text/DefaultFormatterFactory.java,
* javax/swing/text/DefaultHighlighter.java,
* javax/swing/text/DefaultStyledDocument.java,
* javax/swing/text/DocumentFilter.java,
* javax/swing/text/EditorKit.java,
* javax/swing/text/Element.java,
* javax/swing/text/ElementIterator.java,
* javax/swing/text/EmptyAttributeSet.java,
* javax/swing/text/FieldView.java,
* javax/swing/text/FlowView.java,
* javax/swing/text/GapContent.java,
* javax/swing/text/GlyphView.java,
* javax/swing/text/Highlighter.java,
* javax/swing/text/InternationalFormatter.java,
* javax/swing/text/JTextComponent.java,
* javax/swing/text/Keymap.java,
* javax/swing/text/LayeredHighlighter.java,
* javax/swing/text/LayoutQueue.java,
* javax/swing/text/MaskFormatter.java,
* javax/swing/text/MutableAttributeSet.java,
* javax/swing/text/NavigationFilter.java,
* javax/swing/text/NumberFormatter.java,
* javax/swing/text/ParagraphView.java,
* javax/swing/text/PasswordView.java,
* javax/swing/text/PlainDocument.java,
* javax/swing/text/PlainView.java,
* javax/swing/text/Position.java,
* javax/swing/text/Segment.java,
* javax/swing/text/SimpleAttributeSet.java,
* javax/swing/text/StringContent.java,
* javax/swing/text/Style.java,
* javax/swing/text/StyleConstants.java,
* javax/swing/text/StyleContext.java,
* javax/swing/text/StyledDocument.java,
* javax/swing/text/StyledEditorKit.java,
* javax/swing/text/TabExpander.java,
* javax/swing/text/TabSet.java,
* javax/swing/text/TabStop.java,
* javax/swing/text/TabableView.java,
* javax/swing/text/TableView.java,
* javax/swing/text/TextAction.java,
* javax/swing/text/Utilities.java,
* javax/swing/text/View.java,
* javax/swing/text/ViewFactory.java,
* javax/swing/text/WrappedPlainView.java,
* javax/swing/text/html/BRView.java,
* javax/swing/text/html/BlockView.java,
* javax/swing/text/html/CSS.java,
* javax/swing/text/html/CSSBorder.java,
* javax/swing/text/html/CSSParser.java,
* javax/swing/text/html/FormView.java,
* javax/swing/text/html/HRuleView.java,
* javax/swing/text/html/HTMLDocument.java,
* javax/swing/text/html/HTMLEditorKit.java,
* javax/swing/text/html/HTMLWriter.java,
* javax/swing/text/html/ImageView.java,
* javax/swing/text/html/InlineView.java,
* javax/swing/text/html/ListView.java,
* javax/swing/text/html/MinimalHTMLWriter.java,
* javax/swing/text/html/MultiAttributeSet.java,
* javax/swing/text/html/MultiStyle.java,
* javax/swing/text/html/ParagraphView.java,
* javax/swing/text/html/StyleSheet.java,
* javax/swing/text/html/TableView.java,
* javax/swing/text/html/ViewAttributeSet.java,
* javax/swing/text/html/parser/Entity.java,
* javax/swing/text/html/parser/Parser.java,
* javax/swing/text/rtf/RTFParser.java,
* javax/swing/text/rtf/RTFScanner.java,
* javax/swing/tree/AbstractLayoutCache.java,
* javax/swing/tree/DefaultMutableTreeNode.java,
* javax/swing/tree/DefaultTreeCellEditor.java,
* javax/swing/tree/DefaultTreeCellRenderer.java,
* javax/swing/tree/DefaultTreeModel.java,
* javax/swing/tree/DefaultTreeSelectionModel.java,
* javax/swing/tree/ExpandVetoException.java,
* javax/swing/tree/FixedHeightLayoutCache.java,
* javax/swing/tree/MutableTreeNode.java,
* javax/swing/tree/RowMapper.java,
* javax/swing/tree/TreeCellEditor.java,
* javax/swing/tree/TreeCellRenderer.java,
* javax/swing/tree/TreeNode.java,
* javax/swing/tree/TreePath.java,
* javax/swing/tree/TreeSelectionModel.java,
* javax/swing/tree/VariableHeightLayoutCache.java,
* javax/swing/undo/AbstractUndoableEdit.java,
* javax/swing/undo/CompoundEdit.java,
* javax/swing/undo/StateEdit.java,
* javax/swing/undo/UndoManager.java,
* javax/swing/undo/UndoableEdit.java,
* javax/tools/FileObject.java,
* javax/transaction/HeuristicCommitException.java,
* javax/transaction/HeuristicMixedException.java,
* javax/transaction/HeuristicRollbackException.java,
* javax/transaction/InvalidTransactionException.java,
* javax/transaction/NotSupportedException.java,
* javax/transaction/RollbackException.java,
* javax/transaction/Status.java,
* javax/transaction/Synchronization.java,
* javax/transaction/SystemException.java,
* javax/transaction/Transaction.java,
* javax/transaction/TransactionManager.java,
* javax/transaction/TransactionRequiredException.java,
* javax/transaction/TransactionRolledbackException.java,
* javax/transaction/UserTransaction.java,
* javax/transaction/xa/XAException.java,
* javax/transaction/xa/XAResource.java,
* javax/transaction/xa/Xid.java,
* 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/namespace/NamespaceContext.java,
* javax/xml/namespace/QName.java,
* 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/stream/EventFilter.java,
* javax/xml/stream/FactoryConfigurationError.java,
* javax/xml/stream/Location.java,
* javax/xml/stream/StreamFilter.java,
* javax/xml/stream/XMLEventFactory.java,
* javax/xml/stream/XMLEventReader.java,
* javax/xml/stream/XMLEventWriter.java,
* javax/xml/stream/XMLInputFactory.java,
* javax/xml/stream/XMLOutputFactory.java,
* javax/xml/stream/XMLReporter.java,
* javax/xml/stream/XMLResolver.java,
* javax/xml/stream/XMLStreamConstants.java,
* javax/xml/stream/XMLStreamException.java,
* javax/xml/stream/XMLStreamReader.java,
* javax/xml/stream/XMLStreamWriter.java,
* javax/xml/stream/events/Attribute.java,
* javax/xml/stream/events/Characters.java,
* javax/xml/stream/events/Comment.java,
* javax/xml/stream/events/DTD.java,
* javax/xml/stream/events/EndDocument.java,
* javax/xml/stream/events/EndElement.java,
* javax/xml/stream/events/EntityDeclaration.java,
* javax/xml/stream/events/EntityReference.java,
* javax/xml/stream/events/Namespace.java,
* javax/xml/stream/events/NotationDeclaration.java,
* javax/xml/stream/events/ProcessingInstruction.java,
* javax/xml/stream/events/StartDocument.java,
* javax/xml/stream/events/StartElement.java,
* javax/xml/stream/events/XMLEvent.java,
* javax/xml/stream/util/EventReaderDelegate.java,
* javax/xml/stream/util/StreamReaderDelegate.java,
* javax/xml/stream/util/XMLEventAllocator.java,
* javax/xml/stream/util/XMLEventConsumer.java,
* 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/dom/DOMLocator.java,
* javax/xml/transform/dom/DOMResult.java,
* javax/xml/transform/dom/DOMSource.java,
* 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/stream/StreamResult.java,
* javax/xml/transform/stream/StreamSource.java,
* javax/xml/validation/Schema.java,
* javax/xml/validation/SchemaFactory.java,
* javax/xml/validation/SchemaFactoryLoader.java,
* javax/xml/validation/TypeInfoProvider.java,
* javax/xml/validation/Validator.java,
* javax/xml/validation/ValidatorHandler.java,
* 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,
* org/omg/CORBA/ARG_IN.java,
* org/omg/CORBA/ARG_INOUT.java,
* org/omg/CORBA/ARG_OUT.java,
* org/omg/CORBA/AnySeqHolder.java,
* org/omg/CORBA/BAD_CONTEXT.java,
* org/omg/CORBA/BAD_INV_ORDER.java,
* org/omg/CORBA/BAD_OPERATION.java,
* org/omg/CORBA/BAD_PARAM.java,
* org/omg/CORBA/BAD_POLICY.java,
* org/omg/CORBA/BAD_POLICY_TYPE.java,
* org/omg/CORBA/BAD_POLICY_VALUE.java,
* org/omg/CORBA/BAD_TYPECODE.java,
* org/omg/CORBA/COMM_FAILURE.java,
* org/omg/CORBA/CTX_RESTRICT_SCOPE.java,
* org/omg/CORBA/CompletionStatus.java,
* org/omg/CORBA/CompletionStatusHelper.java,
* org/omg/CORBA/Context.java,
* org/omg/CORBA/Current.java,
* org/omg/CORBA/CurrentHelper.java,
* org/omg/CORBA/CurrentHolder.java,
* org/omg/CORBA/CustomMarshal.java,
* org/omg/CORBA/CustomValue.java,
* org/omg/CORBA/DATA_CONVERSION.java,
* org/omg/CORBA/DataInputStream.java,
* org/omg/CORBA/DataOutputStream.java,
* org/omg/CORBA/DefinitionKind.java,
* org/omg/CORBA/DefinitionKindHelper.java,
* org/omg/CORBA/DynamicImplementation.java,
* org/omg/CORBA/FREE_MEM.java,
* org/omg/CORBA/FieldNameHelper.java,
* org/omg/CORBA/IDLTypeHelper.java,
* org/omg/CORBA/IMP_LIMIT.java,
* org/omg/CORBA/INITIALIZE.java,
* org/omg/CORBA/INTERNAL.java,
* org/omg/CORBA/INTF_REPOS.java,
* org/omg/CORBA/INVALID_TRANSACTION.java,
* org/omg/CORBA/INV_FLAG.java,
* org/omg/CORBA/INV_IDENT.java,
* org/omg/CORBA/INV_OBJREF.java,
* org/omg/CORBA/INV_POLICY.java,
* org/omg/CORBA/IRObject.java,
* org/omg/CORBA/IRObjectOperations.java,
* org/omg/CORBA/IdentifierHelper.java,
* org/omg/CORBA/LocalObject.java,
* org/omg/CORBA/LongSeqHolder.java,
* org/omg/CORBA/MARSHAL.java,
* org/omg/CORBA/NO_IMPLEMENT.java,
* org/omg/CORBA/NO_MEMORY.java,
* org/omg/CORBA/NO_PERMISSION.java,
* org/omg/CORBA/NO_RESOURCES.java,
* org/omg/CORBA/NO_RESPONSE.java,
* org/omg/CORBA/NVList.java,
* org/omg/CORBA/OBJECT_NOT_EXIST.java,
* org/omg/CORBA/OBJ_ADAPTER.java,
* org/omg/CORBA/OMGVMCID.java,
* org/omg/CORBA/ORB.java,
* org/omg/CORBA/ObjectHelper.java,
* org/omg/CORBA/ObjectHolder.java,
* org/omg/CORBA/PERSIST_STORE.java,
* org/omg/CORBA/ParameterMode.java,
* org/omg/CORBA/ParameterModeHelper.java,
* org/omg/CORBA/PolicyErrorCodeHelper.java,
* org/omg/CORBA/PolicyErrorHelper.java,
* org/omg/CORBA/PolicyErrorHolder.java,
* org/omg/CORBA/PolicyHelper.java,
* org/omg/CORBA/PolicyHolder.java,
* org/omg/CORBA/PolicyListHelper.java,
* org/omg/CORBA/PolicyListHolder.java,
* org/omg/CORBA/PolicyOperations.java,
* org/omg/CORBA/PolicyTypeHelper.java,
* org/omg/CORBA/RepositoryIdHelper.java,
* org/omg/CORBA/Request.java,
* org/omg/CORBA/ServiceDetailHelper.java,
* org/omg/CORBA/ServiceInformationHelper.java,
* org/omg/CORBA/SetOverrideTypeHelper.java,
* org/omg/CORBA/StringValueHelper.java,
* org/omg/CORBA/StructMember.java,
* org/omg/CORBA/StructMemberHelper.java,
* org/omg/CORBA/SystemException.java,
* org/omg/CORBA/TCKind.java,
* org/omg/CORBA/TRANSACTION_REQUIRED.java,
* org/omg/CORBA/TRANSACTION_ROLLEDBACK.java,
* org/omg/CORBA/TRANSIENT.java,
* org/omg/CORBA/TypeCode.java,
* org/omg/CORBA/TypeCodePackage/BadKind.java,
* org/omg/CORBA/TypeCodePackage/Bounds.java,
* org/omg/CORBA/UNSUPPORTED_POLICY.java,
* org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java,
* org/omg/CORBA/UnionMemberHelper.java,
* org/omg/CORBA/UnknownUserException.java,
* org/omg/CORBA/UnknownUserExceptionHolder.java,
* org/omg/CORBA/ValueBaseHelper.java,
* org/omg/CORBA/ValueBaseHolder.java,
* org/omg/CORBA/ValueMemberHelper.java,
* org/omg/CORBA/VersionSpecHelper.java,
* org/omg/CORBA/VisibilityHelper.java,
* org/omg/CORBA/WStringValueHelper.java,
* org/omg/CORBA/WrongTransactionHelper.java,
* org/omg/CORBA/WrongTransactionHolder.java,
* org/omg/CORBA/_IDLTypeStub.java,
* org/omg/CORBA/_PolicyStub.java,
* org/omg/CORBA/portable/CustomValue.java,
* org/omg/CORBA/portable/Delegate.java,
* org/omg/CORBA/portable/ObjectImpl.java,
* org/omg/CORBA/portable/StreamableValue.java,
* org/omg/CORBA/portable/ValueBase.java,
* org/omg/CORBA_2_3/ORB.java,
* org/omg/CORBA_2_3/portable/Delegate.java,
* org/omg/CORBA_2_3/portable/InputStream.java,
* org/omg/CORBA_2_3/portable/ObjectImpl.java,
* org/omg/CORBA_2_3/portable/OutputStream.java,
* org/omg/CosNaming/BindingHelper.java,
* org/omg/CosNaming/BindingIterator.java,
* org/omg/CosNaming/BindingIteratorHelper.java,
* org/omg/CosNaming/BindingIteratorOperations.java,
* org/omg/CosNaming/BindingIteratorPOA.java,
* org/omg/CosNaming/BindingType.java,
* org/omg/CosNaming/BindingTypeHelper.java,
* org/omg/CosNaming/IstringHelper.java,
* org/omg/CosNaming/NameComponentHelper.java,
* org/omg/CosNaming/NameHelper.java,
* org/omg/CosNaming/NamingContext.java,
* org/omg/CosNaming/NamingContextExtHelper.java,
* org/omg/CosNaming/NamingContextExtPOA.java,
* org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java,
* org/omg/CosNaming/NamingContextHelper.java,
* org/omg/CosNaming/NamingContextPOA.java,
* org/omg/CosNaming/NamingContextPackage/AlreadyBound.java,
* org/omg/CosNaming/NamingContextPackage/CannotProceed.java,
* org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java,
* org/omg/CosNaming/NamingContextPackage/InvalidName.java,
* org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java,
* org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java,
* org/omg/CosNaming/NamingContextPackage/NotFound.java,
* org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java,
* org/omg/CosNaming/NamingContextPackage/NotFoundReason.java,
* org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java,
* org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java,
* org/omg/CosNaming/_BindingIteratorImplBase.java,
* org/omg/CosNaming/_BindingIteratorStub.java,
* org/omg/CosNaming/_NamingContextExtStub.java,
* org/omg/CosNaming/_NamingContextStub.java,
* org/omg/Dynamic/Parameter.java,
* org/omg/DynamicAny/AnySeqHelper.java,
* org/omg/DynamicAny/DynAny.java,
* org/omg/DynamicAny/DynAnyFactoryHelper.java,
* org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java,
* org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java,
* org/omg/DynamicAny/DynAnyHelper.java,
* org/omg/DynamicAny/DynAnyPackage/InvalidValue.java,
* org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java,
* org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java,
* org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java,
* org/omg/DynamicAny/DynAnySeqHelper.java,
* org/omg/DynamicAny/DynArrayHelper.java,
* org/omg/DynamicAny/DynEnumHelper.java,
* org/omg/DynamicAny/DynFixedHelper.java,
* org/omg/DynamicAny/DynSequenceHelper.java,
* org/omg/DynamicAny/DynStructHelper.java,
* org/omg/DynamicAny/DynUnionHelper.java,
* org/omg/DynamicAny/DynValueBox.java,
* org/omg/DynamicAny/DynValueCommonOperations.java,
* org/omg/DynamicAny/DynValueHelper.java,
* org/omg/DynamicAny/FieldNameHelper.java,
* org/omg/DynamicAny/NameDynAnyPairHelper.java,
* org/omg/DynamicAny/NameDynAnyPairSeqHelper.java,
* org/omg/DynamicAny/NameValuePair.java,
* org/omg/DynamicAny/NameValuePairHelper.java,
* org/omg/DynamicAny/NameValuePairSeqHelper.java,
* org/omg/DynamicAny/_DynAnyFactoryStub.java,
* org/omg/DynamicAny/_DynAnyStub.java,
* org/omg/DynamicAny/_DynArrayStub.java,
* org/omg/DynamicAny/_DynEnumStub.java,
* org/omg/DynamicAny/_DynFixedStub.java,
* org/omg/DynamicAny/_DynSequenceStub.java,
* org/omg/DynamicAny/_DynStructStub.java,
* org/omg/DynamicAny/_DynUnionStub.java,
* org/omg/DynamicAny/_DynValueStub.java,
* org/omg/IOP/Codec.java,
* org/omg/IOP/CodecFactory.java,
* org/omg/IOP/CodecFactoryHelper.java,
* org/omg/IOP/CodecFactoryOperations.java,
* org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java,
* org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java,
* org/omg/IOP/CodecOperations.java,
* org/omg/IOP/CodecPackage/FormatMismatch.java,
* org/omg/IOP/CodecPackage/FormatMismatchHelper.java,
* org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java,
* org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java,
* org/omg/IOP/CodecPackage/TypeMismatch.java,
* org/omg/IOP/CodecPackage/TypeMismatchHelper.java,
* org/omg/IOP/ComponentIdHelper.java,
* org/omg/IOP/Encoding.java,
* org/omg/IOP/IOR.java,
* org/omg/IOP/IORHelper.java,
* org/omg/IOP/IORHolder.java,
* org/omg/IOP/MultipleComponentProfileHelper.java,
* org/omg/IOP/MultipleComponentProfileHolder.java,
* org/omg/IOP/ProfileIdHelper.java,
* org/omg/IOP/ServiceContext.java,
* org/omg/IOP/ServiceContextHelper.java,
* org/omg/IOP/ServiceContextHolder.java,
* org/omg/IOP/ServiceContextListHelper.java,
* org/omg/IOP/ServiceContextListHolder.java,
* org/omg/IOP/ServiceIdHelper.java,
* org/omg/IOP/TaggedComponent.java,
* org/omg/IOP/TaggedComponentHelper.java,
* org/omg/IOP/TaggedComponentHolder.java,
* org/omg/IOP/TaggedProfile.java,
* org/omg/IOP/TaggedProfileHelper.java,
* org/omg/IOP/TaggedProfileHolder.java,
* org/omg/IOP/TransactionService.java,
* org/omg/Messaging/SYNC_WITH_TRANSPORT.java,
* org/omg/Messaging/SyncScopeHelper.java,
* org/omg/PortableInterceptor/AdapterManagerIdHelper.java,
* org/omg/PortableInterceptor/AdapterNameHelper.java,
* org/omg/PortableInterceptor/AdapterStateHelper.java,
* org/omg/PortableInterceptor/ClientRequestInfo.java,
* org/omg/PortableInterceptor/ClientRequestInfoOperations.java,
* org/omg/PortableInterceptor/ClientRequestInterceptor.java,
* org/omg/PortableInterceptor/ClientRequestInterceptorOperations.java,
* org/omg/PortableInterceptor/Current.java,
* org/omg/PortableInterceptor/CurrentHelper.java,
* org/omg/PortableInterceptor/CurrentOperations.java,
* org/omg/PortableInterceptor/ForwardRequest.java,
* org/omg/PortableInterceptor/ForwardRequestHelper.java,
* org/omg/PortableInterceptor/IORInfo.java,
* org/omg/PortableInterceptor/IORInfoOperations.java,
* org/omg/PortableInterceptor/IORInterceptor.java,
* org/omg/PortableInterceptor/IORInterceptorOperations.java,
* org/omg/PortableInterceptor/IORInterceptor_3_0.java,
* org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java,
* org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java,
* org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java,
* org/omg/PortableInterceptor/Interceptor.java,
* org/omg/PortableInterceptor/InterceptorOperations.java,
* org/omg/PortableInterceptor/InvalidSlot.java,
* org/omg/PortableInterceptor/InvalidSlotHelper.java,
* org/omg/PortableInterceptor/LOCATION_FORWARD.java,
* org/omg/PortableInterceptor/ORBIdHelper.java,
* org/omg/PortableInterceptor/ORBInitInfo.java,
* org/omg/PortableInterceptor/ORBInitInfoOperations.java,
* org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java,
* org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHelper.java,
* org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java,
* org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHelper.java,
* org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java,
* org/omg/PortableInterceptor/ORBInitializer.java,
* org/omg/PortableInterceptor/ORBInitializerOperations.java,
* org/omg/PortableInterceptor/ObjectIdHelper.java,
* org/omg/PortableInterceptor/ObjectReferenceFactory.java,
* org/omg/PortableInterceptor/ObjectReferenceFactoryHelper.java,
* org/omg/PortableInterceptor/ObjectReferenceFactoryHolder.java,
* org/omg/PortableInterceptor/ObjectReferenceTemplate.java,
* org/omg/PortableInterceptor/ObjectReferenceTemplateHelper.java,
* org/omg/PortableInterceptor/ObjectReferenceTemplateHolder.java,
* org/omg/PortableInterceptor/ObjectReferenceTemplateSeqHelper.java,
* org/omg/PortableInterceptor/ObjectReferenceTemplateSeqHolder.java,
* org/omg/PortableInterceptor/PolicyFactory.java,
* org/omg/PortableInterceptor/PolicyFactoryOperations.java,
* org/omg/PortableInterceptor/RequestInfo.java,
* org/omg/PortableInterceptor/RequestInfoOperations.java,
* org/omg/PortableInterceptor/SUCCESSFUL.java,
* org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java,
* org/omg/PortableInterceptor/ServerIdHelper.java,
* org/omg/PortableInterceptor/ServerRequestInfo.java,
* org/omg/PortableInterceptor/ServerRequestInfoOperations.java,
* org/omg/PortableInterceptor/ServerRequestInterceptor.java,
* org/omg/PortableInterceptor/ServerRequestInterceptorOperations.java,
* org/omg/PortableInterceptor/TRANSPORT_RETRY.java,
* org/omg/PortableInterceptor/USER_EXCEPTION.java,
* org/omg/PortableInterceptor/_IORInterceptor_3_0Stub.java,
* org/omg/PortableServer/AdapterActivator.java,
* org/omg/PortableServer/AdapterActivatorOperations.java,
* org/omg/PortableServer/Current.java,
* org/omg/PortableServer/CurrentHelper.java,
* org/omg/PortableServer/CurrentOperations.java,
* org/omg/PortableServer/CurrentPackage/NoContext.java,
* org/omg/PortableServer/CurrentPackage/NoContextHelper.java,
* org/omg/PortableServer/DynamicImplementation.java,
* org/omg/PortableServer/ForwardRequest.java,
* org/omg/PortableServer/ForwardRequestHelper.java,
* org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java,
* org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java,
* org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java,
* org/omg/PortableServer/IdAssignmentPolicy.java,
* org/omg/PortableServer/IdAssignmentPolicyOperations.java,
* org/omg/PortableServer/IdAssignmentPolicyValue.java,
* org/omg/PortableServer/IdUniquenessPolicy.java,
* org/omg/PortableServer/IdUniquenessPolicyOperations.java,
* org/omg/PortableServer/IdUniquenessPolicyValue.java,
* org/omg/PortableServer/ImplicitActivationPolicy.java,
* org/omg/PortableServer/ImplicitActivationPolicyOperations.java,
* org/omg/PortableServer/ImplicitActivationPolicyValue.java,
* org/omg/PortableServer/LifespanPolicy.java,
* org/omg/PortableServer/LifespanPolicyOperations.java,
* org/omg/PortableServer/LifespanPolicyValue.java,
* org/omg/PortableServer/POA.java,
* org/omg/PortableServer/POAHelper.java,
* org/omg/PortableServer/POAManager.java,
* org/omg/PortableServer/POAManagerOperations.java,
* org/omg/PortableServer/POAManagerPackage/AdapterInactive.java,
* org/omg/PortableServer/POAManagerPackage/AdapterInactiveHelper.java,
* org/omg/PortableServer/POAManagerPackage/State.java,
* org/omg/PortableServer/POAOperations.java,
* org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java,
* org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java,
* org/omg/PortableServer/POAPackage/AdapterNonExistent.java,
* org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java,
* org/omg/PortableServer/POAPackage/InvalidPolicy.java,
* org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java,
* org/omg/PortableServer/POAPackage/NoServant.java,
* org/omg/PortableServer/POAPackage/NoServantHelper.java,
* org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java,
* org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java,
* org/omg/PortableServer/POAPackage/ObjectNotActive.java,
* org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java,
* org/omg/PortableServer/POAPackage/ServantAlreadyActive.java,
* org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java,
* org/omg/PortableServer/POAPackage/ServantNotActive.java,
* org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java,
* org/omg/PortableServer/POAPackage/WrongAdapter.java,
* org/omg/PortableServer/POAPackage/WrongAdapterHelper.java,
* org/omg/PortableServer/POAPackage/WrongPolicy.java,
* org/omg/PortableServer/POAPackage/WrongPolicyHelper.java,
* org/omg/PortableServer/RequestProcessingPolicy.java,
* org/omg/PortableServer/RequestProcessingPolicyOperations.java,
* org/omg/PortableServer/RequestProcessingPolicyValue.java,
* org/omg/PortableServer/Servant.java,
* org/omg/PortableServer/ServantActivator.java,
* org/omg/PortableServer/ServantActivatorHelper.java,
* org/omg/PortableServer/ServantActivatorOperations.java,
* org/omg/PortableServer/ServantActivatorPOA.java,
* org/omg/PortableServer/ServantLocator.java,
* org/omg/PortableServer/ServantLocatorHelper.java,
* org/omg/PortableServer/ServantLocatorOperations.java,
* org/omg/PortableServer/ServantLocatorPOA.java,
* org/omg/PortableServer/ServantLocatorPackage/CookieHolder.java,
* org/omg/PortableServer/ServantManager.java,
* org/omg/PortableServer/ServantManagerOperations.java,
* org/omg/PortableServer/ServantRetentionPolicy.java,
* org/omg/PortableServer/ServantRetentionPolicyOperations.java,
* org/omg/PortableServer/ServantRetentionPolicyValue.java,
* org/omg/PortableServer/ThreadPolicy.java,
* org/omg/PortableServer/ThreadPolicyOperations.java,
* org/omg/PortableServer/ThreadPolicyValue.java,
* org/omg/PortableServer/_ServantActivatorStub.java,
* org/omg/PortableServer/_ServantLocatorStub.java,
* org/omg/PortableServer/portable/Delegate.java,
* org/omg/SendingContext/RunTime.java,
* org/omg/SendingContext/RunTimeOperations.java,
* sun/misc/Service.java,
* sun/misc/ServiceConfigurationError.java,
* sun/reflect/annotation/AnnotationInvocationHandler.java,
* sun/reflect/annotation/AnnotationParser.java,
* sun/reflect/annotation/AnnotationType.java,
* sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.java,
* sun/reflect/annotation/ExceptionProxy.java,
* tools/com/sun/javadoc/ClassDoc.java,
* tools/com/sun/javadoc/ConstructorDoc.java,
* tools/com/sun/javadoc/Doc.java,
* tools/com/sun/javadoc/DocErrorReporter.java,
* tools/com/sun/javadoc/Doclet.java,
* tools/com/sun/javadoc/ExecutableMemberDoc.java,
* tools/com/sun/javadoc/FieldDoc.java,
* tools/com/sun/javadoc/MemberDoc.java,
* tools/com/sun/javadoc/MethodDoc.java,
* tools/com/sun/javadoc/PackageDoc.java,
* tools/com/sun/javadoc/ParamTag.java,
* tools/com/sun/javadoc/Parameter.java,
* tools/com/sun/javadoc/ProgramElementDoc.java,
* tools/com/sun/javadoc/RootDoc.java,
* tools/com/sun/javadoc/SeeTag.java,
* tools/com/sun/javadoc/SerialFieldTag.java,
* tools/com/sun/javadoc/Tag.java,
* tools/com/sun/javadoc/ThrowsTag.java,
* tools/com/sun/javadoc/Type.java,
* tools/com/sun/javadoc/TypeVariable.java,
* tools/com/sun/tools/javadoc/Main.java,
* tools/com/sun/tools/javah/Main.java,
* tools/external/asm/org/objectweb/asm/AnnotationVisitor.java,
* tools/external/asm/org/objectweb/asm/AnnotationWriter.java,
* tools/external/asm/org/objectweb/asm/Attribute.java,
* tools/external/asm/org/objectweb/asm/ByteVector.java,
* tools/external/asm/org/objectweb/asm/ClassAdapter.java,
* tools/external/asm/org/objectweb/asm/ClassReader.java,
* tools/external/asm/org/objectweb/asm/ClassVisitor.java,
* tools/external/asm/org/objectweb/asm/ClassWriter.java,
* tools/external/asm/org/objectweb/asm/Edge.java,
* tools/external/asm/org/objectweb/asm/FieldVisitor.java,
* tools/external/asm/org/objectweb/asm/FieldWriter.java,
* tools/external/asm/org/objectweb/asm/Handler.java,
* tools/external/asm/org/objectweb/asm/Item.java,
* tools/external/asm/org/objectweb/asm/Label.java,
* tools/external/asm/org/objectweb/asm/MethodAdapter.java,
* tools/external/asm/org/objectweb/asm/MethodVisitor.java,
* tools/external/asm/org/objectweb/asm/MethodWriter.java,
* tools/external/asm/org/objectweb/asm/Opcodes.java,
* tools/external/asm/org/objectweb/asm/Type.java,
* tools/external/asm/org/objectweb/asm/attrs/StackMapAttribute.java,
* tools/external/asm/org/objectweb/asm/attrs/StackMapFrame.java,
* tools/external/asm/org/objectweb/asm/attrs/StackMapTableAttribute.java,
* tools/external/asm/org/objectweb/asm/attrs/StackMapType.java,
* tools/external/asm/org/objectweb/asm/commons/AdviceAdapter.java,
* tools/external/asm/org/objectweb/asm/commons/EmptyVisitor.java,
* tools/external/asm/org/objectweb/asm/commons/GeneratorAdapter.java,
* tools/external/asm/org/objectweb/asm/commons/LocalVariablesSorter.java,
* tools/external/asm/org/objectweb/asm/commons/Method.java,
* tools/external/asm/org/objectweb/asm/commons/SerialVersionUIDAdder.java,
* tools/external/asm/org/objectweb/asm/commons/StaticInitMerger.java,
* tools/external/asm/org/objectweb/asm/commons/TableSwitchGenerator.java,
* tools/external/asm/org/objectweb/asm/optimizer/AnnotationConstantsCollector.java,
* tools/external/asm/org/objectweb/asm/optimizer/ClassConstantsCollector.java,
* tools/external/asm/org/objectweb/asm/optimizer/ClassOptimizer.java,
* tools/external/asm/org/objectweb/asm/optimizer/Constant.java,
* tools/external/asm/org/objectweb/asm/optimizer/ConstantPool.java,
* tools/external/asm/org/objectweb/asm/optimizer/FieldConstantsCollector.java,
* tools/external/asm/org/objectweb/asm/optimizer/JarOptimizer.java,
* tools/external/asm/org/objectweb/asm/optimizer/MethodConstantsCollector.java,
* tools/external/asm/org/objectweb/asm/optimizer/MethodOptimizer.java,
* tools/external/asm/org/objectweb/asm/optimizer/NameMapping.java,
* tools/external/asm/org/objectweb/asm/optimizer/Shrinker.java,
* tools/external/asm/org/objectweb/asm/signature/SignatureReader.java,
* tools/external/asm/org/objectweb/asm/signature/SignatureVisitor.java,
* tools/external/asm/org/objectweb/asm/signature/SignatureWriter.java,
* tools/external/asm/org/objectweb/asm/tree/AbstractInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/AnnotationNode.java,
* tools/external/asm/org/objectweb/asm/tree/ClassNode.java,
* tools/external/asm/org/objectweb/asm/tree/FieldInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/FieldNode.java,
* tools/external/asm/org/objectweb/asm/tree/IincInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/InnerClassNode.java,
* tools/external/asm/org/objectweb/asm/tree/InsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/IntInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/JumpInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/LabelNode.java,
* tools/external/asm/org/objectweb/asm/tree/LdcInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/LineNumberNode.java,
* tools/external/asm/org/objectweb/asm/tree/LocalVariableNode.java,
* tools/external/asm/org/objectweb/asm/tree/LookupSwitchInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/MemberNode.java,
* tools/external/asm/org/objectweb/asm/tree/MethodInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/MethodNode.java,
* tools/external/asm/org/objectweb/asm/tree/MultiANewArrayInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/TableSwitchInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/TryCatchBlockNode.java,
* tools/external/asm/org/objectweb/asm/tree/TypeInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/VarInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/Analyzer.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/AnalyzerException.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/BasicInterpreter.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/BasicValue.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/BasicVerifier.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/DataflowInterpreter.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/DataflowValue.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/Frame.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/IntMap.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/Interpreter.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/SimpleVerifier.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/SmallSet.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/Subroutine.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/Value.java,
* tools/external/asm/org/objectweb/asm/util/ASMifierAbstractVisitor.java,
* tools/external/asm/org/objectweb/asm/util/ASMifierAnnotationVisitor.java,
* tools/external/asm/org/objectweb/asm/util/ASMifierClassVisitor.java,
* tools/external/asm/org/objectweb/asm/util/ASMifierFieldVisitor.java,
* tools/external/asm/org/objectweb/asm/util/ASMifierMethodVisitor.java,
* tools/external/asm/org/objectweb/asm/util/AbstractVisitor.java,
* tools/external/asm/org/objectweb/asm/util/CheckAnnotationAdapter.java,
* tools/external/asm/org/objectweb/asm/util/CheckClassAdapter.java,
* tools/external/asm/org/objectweb/asm/util/CheckMethodAdapter.java,
* tools/external/asm/org/objectweb/asm/util/TraceAbstractVisitor.java,
* tools/external/asm/org/objectweb/asm/util/TraceAnnotationVisitor.java,
* tools/external/asm/org/objectweb/asm/util/TraceClassVisitor.java,
* tools/external/asm/org/objectweb/asm/util/TraceFieldVisitor.java,
* tools/external/asm/org/objectweb/asm/util/TraceMethodVisitor.java,
* tools/external/asm/org/objectweb/asm/util/TraceSignatureVisitor.java,
* tools/external/asm/org/objectweb/asm/util/attrs/ASMStackMapAttribute.java,
* tools/external/asm/org/objectweb/asm/util/attrs/ASMStackMapTableAttribute.java,
* tools/external/asm/org/objectweb/asm/util/attrs/ASMifiable.java,
* tools/external/asm/org/objectweb/asm/util/attrs/Traceable.java,
* tools/external/asm/org/objectweb/asm/xml/ASMContentHandler.java,
* tools/external/asm/org/objectweb/asm/xml/Processor.java,
* tools/external/asm/org/objectweb/asm/xml/SAXAdapter.java,
* tools/external/asm/org/objectweb/asm/xml/SAXAnnotationAdapter.java,
* tools/external/asm/org/objectweb/asm/xml/SAXClassAdapter.java,
* tools/external/asm/org/objectweb/asm/xml/SAXCodeAdapter.java,
* tools/external/asm/org/objectweb/asm/xml/SAXFieldAdapter.java,
* tools/generated/gnu/classpath/tools/gjdoc/expr/JavaLexer.java,
* tools/generated/gnu/classpath/tools/gjdoc/expr/JavaRecognizer.java,
* tools/generated/gnu/classpath/tools/gjdoc/expr/JavaTokenTypes.java,
* tools/gnu/classpath/tools/FileSystemClassLoader.java,
* tools/gnu/classpath/tools/IOToolkit.java,
* tools/gnu/classpath/tools/MalformedInputEvent.java,
* tools/gnu/classpath/tools/MalformedInputListener.java,
* tools/gnu/classpath/tools/NotifyingInputStreamReader.java,
* tools/gnu/classpath/tools/StringToolkit.java,
* tools/gnu/classpath/tools/appletviewer/AppletSecurityManager.java,
* tools/gnu/classpath/tools/appletviewer/AppletTag.java,
* tools/gnu/classpath/tools/appletviewer/CommonAppletContext.java,
* tools/gnu/classpath/tools/appletviewer/CommonAppletStub.java,
* tools/gnu/classpath/tools/appletviewer/Main.java,
* tools/gnu/classpath/tools/appletviewer/PluginAppletViewer.java,
* tools/gnu/classpath/tools/appletviewer/PluginAppletWindow.java,
* tools/gnu/classpath/tools/appletviewer/StandaloneAppletViewer.java,
* tools/gnu/classpath/tools/appletviewer/StandaloneAppletWindow.java,
* tools/gnu/classpath/tools/appletviewer/TagParser.java,
* tools/gnu/classpath/tools/common/CallbackUtil.java,
* tools/gnu/classpath/tools/common/ClasspathToolParser.java,
* tools/gnu/classpath/tools/common/Persistent.java,
* tools/gnu/classpath/tools/common/ProviderUtil.java,
* tools/gnu/classpath/tools/common/SecurityProviderInfo.java,
* tools/gnu/classpath/tools/doclets/AbstractDoclet.java,
* tools/gnu/classpath/tools/doclets/DocletConfigurationException.java,
* tools/gnu/classpath/tools/doclets/DocletOption.java,
* tools/gnu/classpath/tools/doclets/DocletOptionColonSeparated.java,
* tools/gnu/classpath/tools/doclets/DocletOptionFile.java,
* tools/gnu/classpath/tools/doclets/DocletOptionFlag.java,
* tools/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.java,
* tools/gnu/classpath/tools/doclets/DocletOptionString.java,
* tools/gnu/classpath/tools/doclets/InlineTagRenderer.java,
* tools/gnu/classpath/tools/doclets/InvalidPackageWildcardException.java,
* tools/gnu/classpath/tools/doclets/PackageGroup.java,
* tools/gnu/classpath/tools/doclets/PackageMatcher.java,
* tools/gnu/classpath/tools/doclets/StandardTaglet.java,
* tools/gnu/classpath/tools/doclets/TagletPrinter.java,
* tools/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/CssClass.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/Driver.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/TargetContext.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.java,
* tools/gnu/classpath/tools/getopt/FileArgumentCallback.java,
* tools/gnu/classpath/tools/getopt/Option.java,
* tools/gnu/classpath/tools/getopt/OptionGroup.java,
* tools/gnu/classpath/tools/getopt/Parser.java,
* tools/gnu/classpath/tools/gjdoc/AbstractTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.java,
* tools/gnu/classpath/tools/gjdoc/ClassDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/ClassDocProxy.java,
* tools/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.java,
* tools/gnu/classpath/tools/gjdoc/ConstructorDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/Debug.java,
* tools/gnu/classpath/tools/gjdoc/DirectoryTree.java,
* tools/gnu/classpath/tools/gjdoc/DocImpl.java,
* tools/gnu/classpath/tools/gjdoc/ErrorReporter.java,
* tools/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/FieldDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/GjdocPackageDoc.java,
* tools/gnu/classpath/tools/gjdoc/GjdocRootDoc.java,
* tools/gnu/classpath/tools/gjdoc/InheritDocTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/JavadocWrapper.java,
* tools/gnu/classpath/tools/gjdoc/LinkTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/Main.java,
* tools/gnu/classpath/tools/gjdoc/MemberDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/MethodDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/PackageDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/ParamTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/ParameterImpl.java,
* tools/gnu/classpath/tools/gjdoc/ParseException.java,
* tools/gnu/classpath/tools/gjdoc/Parser.java,
* tools/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/RootDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/SeeTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/SourcePositionImpl.java,
* tools/gnu/classpath/tools/gjdoc/TagContainer.java,
* tools/gnu/classpath/tools/gjdoc/TagImpl.java,
* tools/gnu/classpath/tools/gjdoc/TemporaryStore.java,
* tools/gnu/classpath/tools/gjdoc/TextTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/ThrowsTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/Timer.java,
* tools/gnu/classpath/tools/gjdoc/TimerDoclet.java,
* tools/gnu/classpath/tools/gjdoc/TypeImpl.java,
* tools/gnu/classpath/tools/gjdoc/TypeVariableImpl.java,
* tools/gnu/classpath/tools/gjdoc/ValueTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/WritableType.java,
* tools/gnu/classpath/tools/gjdoc/expr/AdditionExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/AndExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantByte.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantChar.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantDouble.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantFloat.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantInteger.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantLong.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantNull.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantShort.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantString.java,
* tools/gnu/classpath/tools/gjdoc/expr/Context.java,
* tools/gnu/classpath/tools/gjdoc/expr/DivisionExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/EqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/Evaluator.java,
* tools/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.java,
* tools/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/Expression.java,
* tools/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.java,
* tools/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LessThanExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ModuloExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/NegateExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/NotExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/Type.java,
* tools/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/UnaryExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.java,
* tools/gnu/classpath/tools/jar/Creator.java,
* tools/gnu/classpath/tools/jar/Indexer.java,
* tools/gnu/classpath/tools/jar/Main.java,
* tools/gnu/classpath/tools/jar/Updater.java,
* tools/gnu/classpath/tools/jarsigner/JarVerifier.java,
* tools/gnu/classpath/tools/jarsigner/Main.java,
* tools/gnu/classpath/tools/jarsigner/SFHelper.java,
* tools/gnu/classpath/tools/java2xhtml/Java2xhtml.java,
* tools/gnu/classpath/tools/javah/ClassWrapper.java,
* tools/gnu/classpath/tools/javah/CniPrintStream.java,
* tools/gnu/classpath/tools/javah/GcjhMain.java,
* tools/gnu/classpath/tools/javah/JniHelper.java,
* tools/gnu/classpath/tools/javah/JniIncludePrinter.java,
* tools/gnu/classpath/tools/javah/JniStubPrinter.java,
* tools/gnu/classpath/tools/javah/Keywords.java,
* tools/gnu/classpath/tools/javah/Main.java,
* tools/gnu/classpath/tools/javah/MethodHelper.java,
* tools/gnu/classpath/tools/keytool/CACertCmd.java,
* tools/gnu/classpath/tools/keytool/CertReqCmd.java,
* tools/gnu/classpath/tools/keytool/Command.java,
* tools/gnu/classpath/tools/keytool/DeleteCmd.java,
* tools/gnu/classpath/tools/keytool/ExportCmd.java,
* tools/gnu/classpath/tools/keytool/GenKeyCmd.java,
* tools/gnu/classpath/tools/keytool/IdentityDBCmd.java,
* tools/gnu/classpath/tools/keytool/ImportCmd.java,
* tools/gnu/classpath/tools/keytool/KeyCloneCmd.java,
* tools/gnu/classpath/tools/keytool/KeyPasswdCmd.java,
* tools/gnu/classpath/tools/keytool/ListCmd.java,
* tools/gnu/classpath/tools/keytool/PrintCertCmd.java,
* tools/gnu/classpath/tools/keytool/SelfCertCmd.java,
* tools/gnu/classpath/tools/keytool/StorePasswdCmd.java,
* tools/gnu/classpath/tools/orbd/Main.java,
* tools/gnu/classpath/tools/orbd/PersistentContext.java,
* tools/gnu/classpath/tools/orbd/PersistentContextMap.java,
* tools/gnu/classpath/tools/orbd/PersistentMap.java,
* tools/gnu/classpath/tools/rmic/AbstractMethodGenerator.java,
* tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java,
* tools/gnu/classpath/tools/rmic/CompilationError.java,
* tools/gnu/classpath/tools/rmic/Generator.java,
* tools/gnu/classpath/tools/rmic/GiopIo.java,
* tools/gnu/classpath/tools/rmic/HashFinder.java,
* tools/gnu/classpath/tools/rmic/Main.java,
* tools/gnu/classpath/tools/rmic/MethodGenerator.java,
* tools/gnu/classpath/tools/rmic/RMICException.java,
* tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java,
* tools/gnu/classpath/tools/rmic/RmicBackend.java,
* tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java,
* tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java,
* tools/gnu/classpath/tools/rmic/Variables.java,
* tools/gnu/classpath/tools/rmic/WrapUnWrapper.java,
* tools/gnu/classpath/tools/rmid/ActivationSystemImpl.java,
* tools/gnu/classpath/tools/rmid/ActivationSystemImpl_Stub.java,
* tools/gnu/classpath/tools/rmid/Main.java,
* tools/gnu/classpath/tools/rmid/PersistentBidiHashTable.java,
* tools/gnu/classpath/tools/rmiregistry/Main.java,
* tools/gnu/classpath/tools/rmiregistry/PersistentHashTable.java,
* tools/gnu/classpath/tools/rmiregistry/RegistryImpl.java,
* tools/gnu/classpath/tools/rmiregistry/RegistryImpl_Skel.java,
* tools/gnu/classpath/tools/rmiregistry/RegistryImpl_Stub.java,
* tools/gnu/classpath/tools/serialver/SerialVer.java,
* tools/gnu/classpath/tools/taglets/AuthorTaglet.java,
* tools/gnu/classpath/tools/taglets/CodeTaglet.java,
* tools/gnu/classpath/tools/taglets/CopyrightTaglet.java,
* tools/gnu/classpath/tools/taglets/DeprecatedTaglet.java,
* tools/gnu/classpath/tools/taglets/GenericTaglet.java,
* tools/gnu/classpath/tools/taglets/GnuExtendedTaglet.java,
* tools/gnu/classpath/tools/taglets/SinceTaglet.java,
* tools/gnu/classpath/tools/taglets/TagletContext.java,
* tools/gnu/classpath/tools/taglets/ValueTaglet.java,
* tools/gnu/classpath/tools/taglets/VersionTaglet.java,
* tools/gnu/classpath/tools/tnameserv/Main.java,
* vm/reference/gnu/classpath/jdwp/VMFrame.java,
* vm/reference/gnu/classpath/jdwp/VMIdManager.java,
* vm/reference/gnu/classpath/jdwp/VMMethod.java,
* vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java,
* vm/reference/gnu/java/lang/VMCPStringBuilder.java,
* vm/reference/gnu/java/lang/VMInstrumentationImpl.java,
* vm/reference/gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMCompilationMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMMemoryMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMThreadMXBeanImpl.java,
* vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java,
* vm/reference/gnu/java/net/VMPlainSocketImpl.java,
* vm/reference/gnu/java/nio/VMChannel.java,
* vm/reference/gnu/java/nio/VMPipe.java,
* vm/reference/gnu/java/nio/VMSelector.java,
* vm/reference/gnu/java/security/jce/prng/VMSecureRandom.java,
* vm/reference/java/io/VMFile.java,
* vm/reference/java/io/VMObjectInputStream.java,
* vm/reference/java/io/VMObjectStreamClass.java,
* vm/reference/java/lang/VMClass.java,
* vm/reference/java/lang/VMClassLoader.java,
* vm/reference/java/lang/VMDouble.java,
* vm/reference/java/lang/VMFloat.java,
* vm/reference/java/lang/VMMath.java,
* vm/reference/java/lang/VMObject.java,
* vm/reference/java/lang/VMProcess.java,
* vm/reference/java/lang/VMRuntime.java,
* vm/reference/java/lang/VMString.java,
* vm/reference/java/lang/VMSystem.java,
* vm/reference/java/lang/VMThread.java,
* vm/reference/java/lang/reflect/VMConstructor.java,
* vm/reference/java/lang/reflect/VMField.java,
* vm/reference/java/lang/reflect/VMMethod.java,
* vm/reference/java/net/VMNetworkInterface.java,
* vm/reference/java/nio/channels/VMChannels.java,
* vm/reference/java/security/VMAccessController.java,
* vm/reference/java/security/VMSecureRandom.java,
* vm/reference/java/util/VMTimeZone.java,
* vm/reference/sun/misc/Unsafe.java,
* vm/reference/sun/reflect/Reflection.java,
* vm/reference/sun/reflect/misc/ReflectUtil.java:
Normalise whitespace.
From-SVN: r168680
Diffstat (limited to 'libjava/classpath/gnu/xml')
416 files changed, 9971 insertions, 10207 deletions
diff --git a/libjava/classpath/gnu/xml/aelfred2/JAXPFactory.java b/libjava/classpath/gnu/xml/aelfred2/JAXPFactory.java index 011ca3c..0944427 100644 --- a/libjava/classpath/gnu/xml/aelfred2/JAXPFactory.java +++ b/libjava/classpath/gnu/xml/aelfred2/JAXPFactory.java @@ -1,4 +1,4 @@ -/* JAXPFactory.java -- +/* JAXPFactory.java -- Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -63,7 +63,7 @@ import javax.xml.parsers.SAXParserFactory; public final class JAXPFactory extends SAXParserFactory { - + private Hashtable flags = new Hashtable(); /** @@ -86,7 +86,7 @@ public final class JAXPFactory parser.setFeature(SAXDriver.FEATURE + "validation", isValidating()); // that makes SAX2 feature flags trump JAXP - + while (e.hasMoreElements()) { String uri = (String) e.nextElement(); @@ -98,8 +98,8 @@ public final class JAXPFactory } // yes, this "feature transfer" mechanism doesn't play well - - public void setFeature(String name, boolean value) + + public void setFeature(String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException { @@ -108,7 +108,7 @@ public final class JAXPFactory // force "early" detection of errors where possible // (flags can't necessarily be set before parsing) new JaxpParser().getXMLReader().setFeature(name, value); - + flags.put(name, Boolean.valueOf(value)); } catch (SAXNotRecognizedException e) @@ -127,12 +127,12 @@ public final class JAXPFactory } } - public boolean getFeature(String name) + public boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException { Boolean value = (Boolean) flags.get(name); - + if (value != null) { return value.booleanValue(); @@ -159,25 +159,25 @@ public final class JAXPFactory } } } - + private static class JaxpParser extends SAXParser { - + private XmlReader ae2 = new XmlReader(); private XMLReaderAdapter parser = null; - + JaxpParser() { } - public void setProperty(String id, Object value) + public void setProperty(String id, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { ae2.setProperty(id, value); } - public Object getProperty(String id) + public Object getProperty(String id) throws SAXNotRecognizedException, SAXNotSupportedException { return ae2.getProperty(id); @@ -210,7 +210,7 @@ public final class JAXPFactory throw new Error(); } } - + public boolean isValidating() { try @@ -222,10 +222,9 @@ public final class JAXPFactory throw new Error(); } } - + // TODO isXIncludeAware() - + } - -} +} diff --git a/libjava/classpath/gnu/xml/aelfred2/SAXDriver.java b/libjava/classpath/gnu/xml/aelfred2/SAXDriver.java index e7c4d5a..6ce1470 100644 --- a/libjava/classpath/gnu/xml/aelfred2/SAXDriver.java +++ b/libjava/classpath/gnu/xml/aelfred2/SAXDriver.java @@ -1,4 +1,4 @@ -/* SAXDriver.java -- +/* SAXDriver.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -80,45 +80,45 @@ import org.xml.sax.helpers.NamespaceSupport; * * <table border="1" width='100%' cellpadding='3' cellspacing='0'> * <tr bgcolor='#ccccff'> - * <th><font size='+1'>Name</font></th> - * <th><font size='+1'>Notes</font></th></tr> + * <th><font size='+1'>Name</font></th> + * <th><font size='+1'>Notes</font></th></tr> * * <tr><td colspan=2><center><em>Features ... URL prefix is * <b>http://xml.org/sax/features/</b></em></center></td></tr> * * <tr><td>(URL)/external-general-entities</td> - * <td>Value defaults to <em>true</em></td></tr> + * <td>Value defaults to <em>true</em></td></tr> * <tr><td>(URL)/external-parameter-entities</td> - * <td>Value defaults to <em>true</em></td></tr> + * <td>Value defaults to <em>true</em></td></tr> * <tr><td>(URL)/is-standalone</td> - * <td>(PRELIMINARY) Returns true iff the document's parsing - * has started (some non-error event after <em>startDocument()</em> - * was reported) and the document's standalone flag is set.</td></tr> + * <td>(PRELIMINARY) Returns true iff the document's parsing + * has started (some non-error event after <em>startDocument()</em> + * was reported) and the document's standalone flag is set.</td></tr> * <tr><td>(URL)/namespace-prefixes</td> - * <td>Value defaults to <em>false</em> (but XML 1.0 names are - * always reported)</td></tr> + * <td>Value defaults to <em>false</em> (but XML 1.0 names are + * always reported)</td></tr> * <tr><td>(URL)/lexical-handler/parameter-entities</td> - * <td>Value is fixed at <em>true</em></td></tr> + * <td>Value is fixed at <em>true</em></td></tr> * <tr><td>(URL)/namespaces</td> - * <td>Value defaults to <em>true</em></td></tr> + * <td>Value defaults to <em>true</em></td></tr> * <tr><td>(URL)/resolve-dtd-uris</td> - * <td>(PRELIMINARY) Value defaults to <em>true</em></td></tr> + * <td>(PRELIMINARY) Value defaults to <em>true</em></td></tr> * <tr><td>(URL)/string-interning</td> - * <td>Value is fixed at <em>true</em></td></tr> + * <td>Value is fixed at <em>true</em></td></tr> * <tr><td>(URL)/use-attributes2</td> - * <td>(PRELIMINARY) Value is fixed at <em>true</em></td></tr> + * <td>(PRELIMINARY) Value is fixed at <em>true</em></td></tr> * <tr><td>(URL)/use-entity-resolver2</td> - * <td>(PRELIMINARY) Value defaults to <em>true</em></td></tr> + * <td>(PRELIMINARY) Value defaults to <em>true</em></td></tr> * <tr><td>(URL)/validation</td> - * <td>Value is fixed at <em>false</em></td></tr> + * <td>Value is fixed at <em>false</em></td></tr> * * <tr><td colspan=2><center><em>Handler Properties ... URL prefix is * <b>http://xml.org/sax/properties/</b></em></center></td></tr> * * <tr><td>(URL)/declaration-handler</td> - * <td>A declaration handler may be provided. </td></tr> + * <td>A declaration handler may be provided. </td></tr> * <tr><td>(URL)/lexical-handler</td> - * <td>A lexical handler may be provided. </td></tr> + * <td>A lexical handler may be provided. </td></tr> * </table> * * <p>This parser currently implements the SAX1 Parser API, but @@ -131,10 +131,10 @@ import org.xml.sax.helpers.NamespaceSupport; final public class SAXDriver implements Locator, Attributes2, XMLReader, Parser, AttributeList { - + private final DefaultHandler2 base = new DefaultHandler2(); private XmlParser parser; - + private EntityResolver entityResolver = base; private EntityResolver2 resolver2 = null; private ContentHandler contentHandler = base; @@ -142,28 +142,28 @@ final public class SAXDriver private ErrorHandler errorHandler = base; private DeclHandler declHandler = base; private LexicalHandler lexicalHandler = base; - + private String elementName; private Stack entityStack; - + // one vector (of object/struct): faster, smaller private List attributesList; - + private boolean namespaces = true; private boolean xmlNames = false; private boolean extGE = true; private boolean extPE = true; private boolean resolveAll = true; private boolean useResolver2 = true; - + // package private to allow (read-only) access in XmlParser boolean stringInterning = true; - + private int attributeCount; private boolean attributes; private String[] nsTemp; private NamespaceSupport prefixStack; - + // // Constructor. // @@ -355,12 +355,12 @@ final public class SAXDriver throw new IllegalStateException(); } parser.setHandler(this); - + try { Reader r = source.getCharacterStream(); InputStream in = source.getByteStream(); - + parser.doParse(source.getSystemId(), source.getPublicId(), r, @@ -430,7 +430,7 @@ final public class SAXDriver { return extPE; } - + // element/attribute names are as written in document; no mangling if ((FEATURE + "namespace-prefixes").equals(featureId)) { @@ -454,15 +454,15 @@ final public class SAXDriver { return stringInterning; } - + // EXTENSIONS 1.1 - + // always returns isSpecified info if ((FEATURE + "use-attributes2").equals(featureId)) { return true; } - + // meaningful between startDocument/endDocument if ((FEATURE + "is-standalone").equals(featureId)) { @@ -484,7 +484,7 @@ final public class SAXDriver { return useResolver2; } - + throw new SAXNotRecognizedException(featureId); } @@ -518,7 +518,7 @@ final public class SAXDriver { return (lexicalHandler == base) ? null : lexicalHandler; } - + // unknown properties throw new SAXNotRecognizedException(propertyId); } @@ -531,10 +531,10 @@ final public class SAXDriver throws SAXNotRecognizedException, SAXNotSupportedException { boolean state; - + // Features with a defined value, we just change it if we can. state = getFeature (featureId); - + if (state == value) { return; @@ -601,9 +601,9 @@ final public class SAXDriver { // see if the property is recognized getProperty(propertyId); - + // Properties with a defined value, we just change it if we can. - + if ((PROPERTY + "declaration-handler").equals(propertyId)) { if (value == null) @@ -620,7 +620,7 @@ final public class SAXDriver } return ; } - + if ((PROPERTY + "lexical-handler").equals(propertyId)) { if (value == null) @@ -637,7 +637,7 @@ final public class SAXDriver } return; } - + throw new SAXNotSupportedException(propertyId); } @@ -676,7 +676,7 @@ final public class SAXDriver throws SAXException, IOException { InputSource source; - + // external entities might be skipped if (isPE && !extPE) { @@ -724,7 +724,7 @@ final public class SAXDriver // FIXME normalize system IDs -- when? // - Convert to UTF-8 // - Map reserved and non-ASCII characters to %HH - + try { if (baseURI == null) @@ -749,7 +749,7 @@ final public class SAXDriver { throw e; } - + // sometimes sysids for notations or unparsed entities // aren't really URIs... warn("Can't absolutize SYSTEM id: " + e.getMessage()); @@ -800,15 +800,15 @@ final public class SAXDriver throws SAXException { lexicalHandler.startDTD(name, publicId, systemId); - + // ... the "name" is a declaration and should be given // to the DeclHandler (but sax2 doesn't). - + // the IDs for the external subset are lexical details, // as are the contents of the internal subset; but sax2 // doesn't provide the internal subset "pre-parse" } - + void notationDecl(String name, String publicId, String systemId, String baseUri) throws SAXException @@ -857,7 +857,7 @@ final public class SAXDriver { int index = uri.indexOf(':'); - // many versions of nwalsh docbook stylesheets + // many versions of nwalsh docbook stylesheets // have bogus URLs; so this can't be an error... if (index < 1 && uri.length() != 0) { @@ -866,7 +866,7 @@ final public class SAXDriver // FIXME: char [0] must be ascii alpha; chars [1..index] // must be ascii alphanumeric or in "+-." [RFC 2396] - + //Namespace Constraints //name for xml prefix must be http://www.w3.org/XML/1998/namespace boolean prefixEquality = prefix.equals("xml"); @@ -876,13 +876,13 @@ final public class SAXDriver fatal("xml is by definition bound to the namespace name " + "http://www.w3.org/XML/1998/namespace"); } - + //xmlns prefix declaration is illegal but xml prefix declaration is llegal... if (prefixEquality && uriEquality) { return; } - + //name for xmlns prefix must be http://www.w3.org/2000/xmlns/ prefixEquality = prefix.equals("xmlns"); uriEquality = uri.equals("http://www.w3.org/2000/xmlns/"); @@ -891,14 +891,14 @@ final public class SAXDriver fatal("http://www.w3.org/2000/xmlns/ is by definition bound" + " to prefix xmlns"); } - + //even if the uri is http://www.w3.org/2000/xmlns/ // it is illegal to declare it if (prefixEquality && uriEquality) { fatal ("declaring the xmlns prefix is illegal"); } - + uri = uri.intern(); prefixStack.declarePrefix(prefix, uri); contentHandler.startPrefixMapping(prefix, uri); @@ -915,13 +915,13 @@ final public class SAXDriver prefixStack.pushContext(); } } - + // process namespace decls immediately; // then maybe forget this as an attribute if (namespaces) { int index; - + // default NS declaration? if (stringInterning) { @@ -938,11 +938,11 @@ final public class SAXDriver && qname.startsWith("xmlns")) { String prefix = qname.substring(6); - + if (prefix.equals("")) { fatal("missing prefix " + - "in namespace declaration attribute"); + "in namespace declaration attribute"); } if (value.length() == 0) { @@ -974,7 +974,7 @@ final public class SAXDriver && qname.startsWith("xmlns")) { String prefix = qname.substring(6); - + if (value.length() == 0) { verror("missing URI in namespace decl attribute: " @@ -993,12 +993,12 @@ final public class SAXDriver } // remember this attribute ... attributeCount++; - + // attribute type comes from querying parser's DTD records attributesList.add(new Attribute(qname, value, isSpecified)); - + } - + void startElement(String elname) throws SAXException { @@ -1016,7 +1016,7 @@ final public class SAXDriver // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // - + if (!attributes) { if (namespaces) @@ -1026,7 +1026,7 @@ final public class SAXDriver } else if (namespaces) { - + // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator(); @@ -1035,7 +1035,7 @@ final public class SAXDriver Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; - + // default NS declaration? if (stringInterning) { @@ -1059,13 +1059,13 @@ final public class SAXDriver "character are invalid"); } index = qname.indexOf(':'); - + // NS prefix declaration? if (index == 5 && qname.startsWith("xmlns")) { continue; } - + // it's not a NS decl; patch namespace info items if (prefixStack.processName(qname, nsTemp, true) == null) { @@ -1078,7 +1078,7 @@ final public class SAXDriver } } } - + // save element name so attribute callbacks work elementName = elname; if (namespaces) @@ -1095,7 +1095,7 @@ final public class SAXDriver handler.startElement("", "", elname, this); } // elementName = null; - + // elements with no attributes are pretty common! if (attributes) { @@ -1104,7 +1104,7 @@ final public class SAXDriver attributes = false; } } - + void endElement(String elname) throws SAXException { @@ -1117,9 +1117,9 @@ final public class SAXDriver } prefixStack.processName(elname, nsTemp, false); handler.endElement(nsTemp[0], nsTemp[1], elname); - + Enumeration prefixes = prefixStack.getDeclaredPrefixes(); - + while (prefixes.hasMoreElements()) { handler.endPrefixMapping((String) prefixes.nextElement()); @@ -1170,7 +1170,7 @@ final public class SAXDriver throws SAXException { SAXParseException fatal; - + fatal = new SAXParseException(message, this); errorHandler.fatalError(fatal); @@ -1184,16 +1184,16 @@ final public class SAXDriver throws SAXException { SAXParseException err; - + err = new SAXParseException(message, this); errorHandler.error(err); } - + void warn(String message) throws SAXException { SAXParseException err; - + err = new SAXParseException(message, this); errorHandler.warning(err); } @@ -1307,7 +1307,7 @@ final public class SAXDriver public int getIndex(String uri, String local) { int length = getLength(); - + for (int i = 0; i < length; i++) { if (!getURI(i).equals(uri)) @@ -1328,7 +1328,7 @@ final public class SAXDriver public int getIndex(String xmlName) { int length = getLength(); - + for (int i = 0; i < length; i++) { if (getQName(i).equals(xmlName)) @@ -1345,7 +1345,7 @@ final public class SAXDriver public String getType(String uri, String local) { int index = getIndex(uri, local); - + if (index < 0) { return null; @@ -1360,7 +1360,7 @@ final public class SAXDriver public String getType(String xmlName) { int index = getIndex(xmlName); - + if (index < 0) { return null; @@ -1374,7 +1374,7 @@ final public class SAXDriver public String getValue(String uri, String local) { int index = getIndex(uri, local); - + if (index < 0) { return null; @@ -1389,7 +1389,7 @@ final public class SAXDriver public String getValue(String xmlName) { int index = getIndex(xmlName); - + if (index < 0) { return null; @@ -1404,7 +1404,7 @@ final public class SAXDriver /** @return false unless the attribute was declared in the DTD. * @throws java.lang.ArrayIndexOutOfBoundsException * When the supplied index does not identify an attribute. - */ + */ public boolean isDeclared(int index) { if (index < 0 || index >= attributeCount) @@ -1513,7 +1513,7 @@ final public class SAXDriver private static class Adapter implements ContentHandler { - + private DocumentHandler docHandler; Adapter(DocumentHandler dh) @@ -1525,19 +1525,19 @@ final public class SAXDriver { docHandler.setDocumentLocator(l); } - + public void startDocument() throws SAXException { docHandler.startDocument(); } - + public void processingInstruction(String target, String data) throws SAXException { docHandler.processingInstruction(target, data); } - + public void startPrefixMapping(String prefix, String uri) { /* ignored */ @@ -1589,13 +1589,13 @@ final public class SAXDriver private static class Attribute { - + String name; String value; String nameSpace; String localName; boolean specified; - + Attribute(String name, String value, boolean specified) { this.name = name; @@ -1603,7 +1603,7 @@ final public class SAXDriver this.nameSpace = ""; this.specified = specified; } - + } } diff --git a/libjava/classpath/gnu/xml/aelfred2/XmlParser.java b/libjava/classpath/gnu/xml/aelfred2/XmlParser.java index c0fd802..813593d 100644 --- a/libjava/classpath/gnu/xml/aelfred2/XmlParser.java +++ b/libjava/classpath/gnu/xml/aelfred2/XmlParser.java @@ -1,4 +1,4 @@ -/* XmlParser.java -- +/* XmlParser.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -81,7 +81,7 @@ import org.xml.sax.SAXException; * internal parser interfaces are subject to change. * * @author Written by David Megginson <dmeggins@microstar.com> - * (version 1.2a with bugfixes) + * (version 1.2a with bugfixes) * @author Updated by David Brownell <dbrownell@users.sourceforge.net> * @see SAXDriver */ @@ -94,74 +94,74 @@ final class XmlParser //////////////////////////////////////////////////////////////////////// // Constants. //////////////////////////////////////////////////////////////////////// - + // // Constants for element content type. // - + /** * Constant: an element has not been declared. * @see #getElementContentType */ public final static int CONTENT_UNDECLARED = 0; - + /** * Constant: the element has a content model of ANY. * @see #getElementContentType */ public final static int CONTENT_ANY = 1; - + /** * Constant: the element has declared content of EMPTY. * @see #getElementContentType */ public final static int CONTENT_EMPTY = 2; - + /** * Constant: the element has mixed content. * @see #getElementContentType */ public final static int CONTENT_MIXED = 3; - + /** * Constant: the element has element content. * @see #getElementContentType */ public final static int CONTENT_ELEMENTS = 4; - - + + // // Constants for the entity type. // - + /** * Constant: the entity has not been declared. * @see #getEntityType */ public final static int ENTITY_UNDECLARED = 0; - + /** * Constant: the entity is internal. * @see #getEntityType */ public final static int ENTITY_INTERNAL = 1; - + /** * Constant: the entity is external, non-parsable data. * @see #getEntityType */ public final static int ENTITY_NDATA = 2; - + /** * Constant: the entity is external XML data. * @see #getEntityType */ public final static int ENTITY_TEXT = 3; - + // // Attribute type constants are interned literal strings. // - + // // Constants for supported encodings. "external" is just a flag. // @@ -175,43 +175,43 @@ final class XmlParser private final static int ENCODING_UCS_4_2143 = 7; private final static int ENCODING_UCS_4_3412 = 8; private final static int ENCODING_ASCII = 9; - + // // Constants for attribute default value. // - + /** * Constant: the attribute is not declared. * @see #getAttributeDefaultValueType */ public final static int ATTRIBUTE_DEFAULT_UNDECLARED = 30; - + /** * Constant: the attribute has a literal default value specified. * @see #getAttributeDefaultValueType * @see #getAttributeDefaultValue */ public final static int ATTRIBUTE_DEFAULT_SPECIFIED = 31; - + /** * Constant: the attribute was declared #IMPLIED. * @see #getAttributeDefaultValueType */ public final static int ATTRIBUTE_DEFAULT_IMPLIED = 32; - + /** * Constant: the attribute was declared #REQUIRED. * @see #getAttributeDefaultValueType */ public final static int ATTRIBUTE_DEFAULT_REQUIRED = 33; - + /** * Constant: the attribute was declared #FIXED. * @see #getAttributeDefaultValueType * @see #getAttributeDefaultValue */ public final static int ATTRIBUTE_DEFAULT_FIXED = 34; - + // // Constants for input. // @@ -219,7 +219,7 @@ final class XmlParser private final static int INPUT_INTERNAL = 1; private final static int INPUT_STREAM = 3; private final static int INPUT_READER = 5; - + // // Flags for reading literals. // @@ -227,7 +227,7 @@ final class XmlParser private final static int LIT_ENTITY_REF = 2; // normalize this value (space chars) (attributes, public ids) private final static int LIT_NORMALIZE = 4; - // literal is an attribute value + // literal is an attribute value private final static int LIT_ATTRIBUTE = 8; // don't expand parameter entities private final static int LIT_DISABLE_PE = 16; @@ -235,30 +235,30 @@ final class XmlParser private final static int LIT_DISABLE_CREF = 32; // don't parse general entity refs private final static int LIT_DISABLE_EREF = 64; - // literal is a public ID value + // literal is a public ID value private final static int LIT_PUBID = 256; - + // // Flags affecting PE handling in DTDs (if expandPE is true). // PEs expand with space padding, except inside literals. // private final static int CONTEXT_NORMAL = 0; private final static int CONTEXT_LITERAL = 1; - + // Emit warnings for relative URIs with no base URI. static boolean uriWarnings; static { String key = "gnu.xml.aelfred2.XmlParser.uriWarnings"; GetPropertyAction a = new GetPropertyAction(key); - uriWarnings = "true".equals(AccessController.doPrivileged(a)); + uriWarnings = "true".equals(AccessController.doPrivileged(a)); } - + // // The current XML handler interface. // private SAXDriver handler; - + // // I/O information. // @@ -272,7 +272,7 @@ final class XmlParser private int encoding; // current character encoding private int currentByteCount; // bytes read from current source private InputSource scratch; // temporary - + // // Buffers for decoded but unparsed character input. // @@ -280,33 +280,33 @@ final class XmlParser private int readBufferPos; private int readBufferLength; private int readBufferOverflow; // overflow from last data chunk. - + // // Buffer for undecoded raw byte input. // private final static int READ_BUFFER_MAX = 16384; private byte[] rawReadBuffer; - - + + // // Buffer for attribute values, char refs, DTD stuff. // private static int DATA_BUFFER_INITIAL = 4096; private char[] dataBuffer; private int dataBufferPos; - + // // Buffer for parsed names. // private static int NAME_BUFFER_INITIAL = 1024; private char[] nameBuffer; private int nameBufferPos; - + // // Save any standalone flag // private boolean docIsStandalone; - + // // Hashtables for DTD information on elements, entities, and notations. // Populated until we start ignoring decls (because of skipping a PE) @@ -315,18 +315,18 @@ final class XmlParser private HashMap entityInfo; private HashMap notationInfo; private boolean skippedPE; - + // // Element type currently in force. // private String currentElement; private int currentElementContent; - + // // Stack of entity names, to detect recursion. // private LinkedList entityStack; - + // // PE expansion is enabled in most chunks of the DTD, not all. // When it's enabled, literals are treated differently. @@ -334,14 +334,14 @@ final class XmlParser private boolean inLiteral; private boolean expandPE; private boolean peIsError; - + // // can't report entity expansion inside two constructs: // - attribute expansions (internal entities only) // - markup declarations (parameter entities only) // private boolean doReport; - + // // Symbol table, for caching interned names. // @@ -358,38 +358,38 @@ final class XmlParser // 32 bit hardware. // private final static int SYMBOL_TABLE_LENGTH = 2039; - + private Object[][] symbolTable; - + // // Hash table of attributes found in current start tag. // private String[] tagAttributes; private int tagAttributePos; - + // // Utility flag: have we noticed a CR while reading the last // data chunk? If so, we will have to go back and normalise // CR or CR/LF line ends. // private boolean sawCR; - + // // Utility flag: are we in CDATA? If so, whitespace isn't ignorable. - // + // private boolean inCDATA; - + // // Xml version. - // - private static final int XML_10 = 0; - private static final int XML_11 = 1; + // + private static final int XML_10 = 0; + private static final int XML_11 = 1; private int xmlVersion = XML_10; ////////////////////////////////////////////////////////////////////// // Constructors. //////////////////////////////////////////////////////////////////////// - + /** * Construct a new parser with no associated handler. * @see #setHandler @@ -422,14 +422,14 @@ final class XmlParser * which MUST NOT REUSE the parser (just null it). * * @param systemId Absolute URI of the document; should never be null, - * but may be so iff a reader <em>or</em> a stream is provided. + * but may be so iff a reader <em>or</em> a stream is provided. * @param publicId The public identifier of the document, or null. * @param reader A character stream; must be null if stream isn't. * @param stream A byte input stream; must be null if reader isn't. * @param encoding The suggested encoding, or null if unknown. * @exception java.lang.Exception Basically SAXException or IOException */ - // package private + // package private void doParse(String systemId, String publicId, Reader reader, InputStream stream, String encoding) throws Exception @@ -459,7 +459,7 @@ final class XmlParser // default baseURI: null new ExternalIdentifiers(publicId, systemId, null), reader, stream, encoding, false); - + parseDocument(); } catch (EOFException e) @@ -509,7 +509,7 @@ final class XmlParser ////////////////////////////////////////////////////////////////////// // Error reporting. ////////////////////////////////////////////////////////////////////// - + /** * Report an error. * @param message The error message. @@ -529,7 +529,7 @@ final class XmlParser message = message + " (expected \"" + textExpected + "\")"; } handler.fatal(message); - + // "can't happen" throw new SAXException(message); } @@ -581,7 +581,7 @@ final class XmlParser { // added by MHK error("premature end of file", "[EOF]", null); } - + try { parseMisc(); //skip all white, PIs, and comments @@ -593,7 +593,7 @@ final class XmlParser return; } } - + static final char[] startDelimComment = { '<', '!', '-', '-' }; static final char[] endDelimComment = { '-', '-' }; @@ -609,7 +609,7 @@ final class XmlParser { char c; boolean saved = expandPE; - + expandPE = false; parseUntil(endDelimComment); require('>'); @@ -617,7 +617,7 @@ final class XmlParser handler.comment(dataBuffer, 0, dataBufferPos); dataBufferPos = 0; } - + static final char[] startDelimPI = { '<', '?' }; static final char[] endDelimPI = { '?', '>' }; @@ -636,7 +636,7 @@ final class XmlParser { String name; boolean saved = expandPE; - + expandPE = false; name = readNmtoken(true); //NE08 @@ -657,7 +657,7 @@ final class XmlParser expandPE = saved; handler.processingInstruction(name, dataBufferToString()); } - + static final char[] endDelimCDATA = { ']', ']', '>' }; private boolean isDirtyCurrentElement; @@ -756,7 +756,7 @@ final class XmlParser String standalone = null; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; String inputEncoding = null; - + switch (this.encoding) { case ENCODING_EXTERNAL: @@ -773,7 +773,7 @@ final class XmlParser inputEncoding = "UTF-16LE"; break; } - + // Read the version. require("version"); parseEq(); @@ -796,7 +796,7 @@ final class XmlParser } // Try reading an encoding declaration. boolean white = tryWhitespace(); - + if (tryRead("encoding")) { if (!white) @@ -810,7 +810,7 @@ final class XmlParser setupDecoding(encodingName); } } - + // Try reading a standalone declaration if (encodingName != null) { @@ -869,13 +869,13 @@ final class XmlParser String version; parseEq(); checkLegalVersion(version = readLiteral(flags)); - + if (version.equals("1.1")) { if (xmlVersion == XML_10) { error("external subset has later version number.", "1.0", - version); + version); } handler.warn("expected XML version 1.0, not: " + version); xmlVersion = XML_11; @@ -886,7 +886,7 @@ final class XmlParser } requireWhitespace(); } - + // Read the encoding. require("encoding"); parseEq(); @@ -897,7 +897,7 @@ final class XmlParser } skipWhitespace(); require("?>"); - + return encodingName; } @@ -921,14 +921,14 @@ final class XmlParser throws SAXException, IOException { encodingName = encodingName.toUpperCase(); - + // ENCODING_EXTERNAL indicates an encoding that wasn't // autodetected ... we can use builtin decoders, or // ones from the JVM (InputStreamReader). - + // Otherwise we can only tweak what was autodetected, and // only for single byte (ASCII derived) builtin encodings. - + // ASCII-derived encodings if (encoding == ENCODING_UTF_8 || encoding == ENCODING_EXTERNAL) { @@ -959,7 +959,7 @@ final class XmlParser // else fallthrough ... // it's ASCII-ish and something other than a builtin } - + // Unicode and such if (encoding == ENCODING_UCS_2_12 || encoding == ENCODING_UCS_2_21) { @@ -972,7 +972,7 @@ final class XmlParser } return; } - + // four byte encodings if (encoding == ENCODING_UCS_4_1234 || encoding == ENCODING_UCS_4_4321 @@ -987,11 +987,11 @@ final class XmlParser } return; } - + // assert encoding == ENCODING_EXTERNAL // if (encoding != ENCODING_EXTERNAL) // throw new RuntimeException ("encoding = " + encoding); - + if (encodingName.equals("UTF-16BE")) { encoding = ENCODING_UCS_2_12; @@ -1002,22 +1002,22 @@ final class XmlParser encoding = ENCODING_UCS_2_21; return; } - + // We couldn't use the builtin decoders at all. But we can try to // create a reader, since we haven't messed up buffering. Tweak // the encoding name if necessary. - + if (encodingName.equals("UTF-16") || encodingName.equals("ISO-10646-UCS-2")) { encodingName = "Unicode"; } // Ignoring all the EBCDIC aliases here - + reader = new InputStreamReader(is, encodingName); sourceType = INPUT_READER; } - + /** * Parse miscellaneous markup outside the document element and DOCTYPE * declaration. @@ -1070,12 +1070,12 @@ final class XmlParser // report (a) declaration of name, (b) lexical info (ids) handler.doctypeDecl(rootName, ids.publicId, ids.systemId); - + // Internal subset is parsed first, if present skipWhitespace(); if (tryRead('[')) { - + // loop until the subset ends while (true) { @@ -1097,10 +1097,10 @@ final class XmlParser } skipWhitespace(); require('>'); - + // Read the external subset, if any InputSource subset; - + if (ids.systemId == null) { subset = handler.getExternalSubset(rootName, @@ -1113,7 +1113,7 @@ final class XmlParser if (ids.systemId != null || subset != null) { pushString(null, ">"); - + // NOTE: [dtd] is so we say what SAX2 expects, // though it's misleading (subset, not entire dtd) if (ids.systemId != null) @@ -1132,7 +1132,7 @@ final class XmlParser subset.getEncoding(), false); } - + // Loop until we end up back at '>' while (true) { @@ -1150,20 +1150,20 @@ final class XmlParser expandPE = false; } } - + // the ">" string isn't popped yet if (inputStack.size() != 1) { error("external subset has unmatched '>'"); } } - + // done dtd handler.endDoctype(); expandPE = false; doReport = true; } - + /** * Parse a markup declaration in the internal or external DTD subset. * <pre> @@ -1185,7 +1185,7 @@ final class XmlParser require('<'); unread('<'); expandPE = false; - + if (tryRead("<!ELEMENT")) { saved = readBuffer; @@ -1246,7 +1246,7 @@ final class XmlParser handler.verror("Illegal Declaration/PE nesting"); } } - + /** * Parse an element, with its tags. * <pre> @@ -1270,10 +1270,10 @@ final class XmlParser // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; - + // Read the element type name. gi = readNmtoken(true); - + // If we saw no DTD, and this is the document root element, // let the application modify the input stream by providing one. if (maybeGetSubset) @@ -1284,11 +1284,11 @@ final class XmlParser { String publicId = subset.getPublicId(); String systemId = subset.getSystemId(); - + handler.warn("modifying document by adding DTD"); handler.doctypeDecl(gi, publicId, systemId); pushString(null, ">"); - + // NOTE: [dtd] is so we say what SAX2 expects, // though it's misleading (subset, not entire dtd) pushURL(true, "[dtd]", @@ -1297,7 +1297,7 @@ final class XmlParser subset.getByteStream(), subset.getEncoding(), false); - + // Loop until we end up back at '>' while (true) { @@ -1315,17 +1315,17 @@ final class XmlParser expandPE = false; } } - + // the ">" string isn't popped yet if (inputStack.size() != 1) { error("external subset has unmatched '>'"); } - + handler.endDoctype(); } } - + // Determine the current content type. currentElement = gi; element = (ElementDecl) elementInfo.get(gi); @@ -1346,7 +1346,7 @@ final class XmlParser white = tryWhitespace(); c = readCh(); } - + // Supply any defaulted attributes. Iterator atts = declaredAttributes(element); if (atts != null) @@ -1366,7 +1366,7 @@ loop: } // ... or has a default String value = getAttributeDefaultValue(gi, aname); - + if (value == null) { continue; @@ -1395,7 +1395,7 @@ loop: currentElement = oldElement; currentElementContent = oldElementContent; } - + /** * Parse an attribute assignment. * <pre> @@ -1411,11 +1411,11 @@ loop: String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; - + // Read the attribute name. aname = readNmtoken(true); type = getAttributeType(name, aname); - + // Parse '=' parseEq(); @@ -1457,7 +1457,7 @@ loop: // attribute. handler.attribute(aname, value, true); dataBufferPos = 0; - + // Note that the attribute has been // specified. if (tagAttributePos == tagAttributes.length) @@ -1501,7 +1501,7 @@ loop: // not re-reporting any SAXException re bogus end tags, // even though that diagnostic might be clearer ... } - + /** * Parse the content of an element. * <pre> @@ -1515,7 +1515,7 @@ loop: throws Exception { char c; - + while (true) { // consume characters (or ignorable whitspace) until delimiter @@ -1538,7 +1538,7 @@ loop: } isDirtyCurrentElement = true; break; - + case '<': // Found "<" dataBufferFlush(); c = readCh(); @@ -1567,17 +1567,17 @@ loop: break; } break; - + case '?': // Found "<?" isDirtyCurrentElement = false; parsePI(); break; - + case '/': // Found "</" isDirtyCurrentElement = false; parseETag(); return; - + default: // Found "<" followed by something else isDirtyCurrentElement = false; unread(c); @@ -1587,7 +1587,7 @@ loop: } } } - + /** * Parse an element type declaration. * <pre> @@ -1599,7 +1599,7 @@ loop: throws Exception { String name; - + requireWhitespace(); // Read the element type name. name = readNmtoken(true); @@ -1607,7 +1607,7 @@ loop: requireWhitespace(); // Read the content model. parseContentspec(name); - + skipWhitespace(); require('>'); } @@ -1643,8 +1643,8 @@ loop: else { String model; - char[] saved; - + char[] saved; + require('('); saved = readBuffer; dataBufferAppend('('); @@ -1668,7 +1668,7 @@ loop: } } } - + /** * Parse an element-content model. * <pre> @@ -1686,11 +1686,11 @@ loop: { char c; char sep; - + // Parse the first content particle skipWhitespace(); parseCp(); - + // Check for end or for a separator. skipWhitespace(); c = readCh(); @@ -1702,7 +1702,7 @@ loop: { handler.verror("Illegal Group/PE nesting"); } - + dataBufferAppend(')'); c = readCh(); switch (c) @@ -1725,7 +1725,7 @@ loop: error("bad separator in content model", c, null); return; } - + // Parse the rest of the content model. while (true) { @@ -1740,7 +1740,7 @@ loop: { handler.verror("Illegal Group/PE nesting"); } - + dataBufferAppend(')'); break; } @@ -1754,7 +1754,7 @@ loop: dataBufferAppend(c); } } - + // Check for the occurrence indicator. c = readCh(); switch (c) @@ -1769,7 +1769,7 @@ loop: return; } } - + /** * Parse a content particle. * <pre> @@ -1823,12 +1823,12 @@ loop: { handler.verror("Illegal Group/PE nesting"); } - + dataBufferAppend(")*"); tryRead('*'); return; } - + // Parse mixed content. skipWhitespace(); while (!tryRead(")")) @@ -1839,17 +1839,17 @@ loop: dataBufferAppend(readNmtoken(true)); skipWhitespace(); } - + // VC: Proper Group/PE Nesting if (readBuffer != saved) { handler.verror("Illegal Group/PE nesting"); } - + require('*'); dataBufferAppend(")*"); } - + /** * Parse an attribute list declaration. * <pre> @@ -1861,7 +1861,7 @@ loop: throws Exception { String elementName; - + requireWhitespace(); elementName = readNmtoken(true); boolean white = tryWhitespace(); @@ -1875,7 +1875,7 @@ loop: white = tryWhitespace(); } } - + /** * Parse a single attribute definition. * <pre> @@ -1888,7 +1888,7 @@ loop: String name; String type; String enumer = null; - + // Read the attribute name. name = readNmtoken(true); @@ -1911,7 +1911,7 @@ loop: enumer = dataBufferToString(); } } - + // Read the default value. requireWhitespace(); parseDefault(elementName, name, type, enumer); @@ -1980,7 +1980,7 @@ loop: return null; } } - + /** * Parse an enumeration. * <pre> @@ -2022,7 +2022,7 @@ loop: { requireWhitespace(); require('('); - + parseEnumeration(true); } @@ -2042,11 +2042,11 @@ loop: int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; - + // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns whitespace // chars to spaces (doesn't matter when that's done if it doesn't // interfere with char refs expanding to whitespace). - + if (!skippedPE) { flags |= LIT_ENTITY_REF; @@ -2065,7 +2065,7 @@ loop: } } } - + expandPE = false; if (tryRead('#')) { @@ -2125,7 +2125,7 @@ loop: defaultType, value); } } - + /** * Parse a conditional section. * <pre> @@ -2197,7 +2197,7 @@ loop: error("conditional section must begin with INCLUDE or IGNORE"); } } - + private void parseCharRef() throws SAXException, IOException { @@ -2216,7 +2216,7 @@ loop: { int value = 0; char c; - + if (tryRead('x')) { loop1: @@ -2263,7 +2263,7 @@ loop2: } } } - + // check for character refs being legal XML if ((value < 0x0020 && ! (value == '\n' || value == '\t' || value == '\r')) @@ -2274,7 +2274,7 @@ loop2: error("illegal XML character reference U+" + Integer.toHexString(value)); } - + // Check for surrogates: 00000000 0000xxxx yyyyyyyy zzzzzzzz // (1101|10xx|xxyy|yyyy + 1101|11yy|zzzz|zzzz: if (value > 0x0010ffff) @@ -2283,9 +2283,9 @@ loop2: error("character reference " + value + " is too large for UTF-16", Integer.toString(value), null); } - + } - + /** * Read and interpret a character reference. * <pre> @@ -2298,7 +2298,7 @@ loop2: { int value = 0; char c; - + if (tryRead('x')) { loop1: @@ -2345,7 +2345,7 @@ loop2: } } } - + // check for character refs being legal XML if ((value < 0x0020 && ! (value == '\n' || value == '\t' || value == '\r')) @@ -2356,7 +2356,7 @@ loop2: error("illegal XML character reference U+" + Integer.toHexString(value)); } - + // Check for surrogates: 00000000 0000xxxx yyyyyyyy zzzzzzzz // (1101|10xx|xxyy|yyyy + 1101|11yy|zzzz|zzzz: if (value <= 0x0000ffff) @@ -2382,7 +2382,7 @@ loop2: dataBufferFlush(); } } - + /** * Parse and expand an entity reference. * <pre> @@ -2395,7 +2395,7 @@ loop2: throws SAXException, IOException { String name; - + name = readNmtoken(true); require(';'); switch (getEntityType(name)) @@ -2406,7 +2406,7 @@ loop2: // unless the processor might _legitimately_ not have seen a // declaration ... which is what this implements. String message; - + message = "reference to undeclared general entity " + name; if (skippedPE && !docIsStandalone) { @@ -2424,25 +2424,25 @@ loop2: break; case ENTITY_INTERNAL: pushString(name, getEntityValue(name)); - + //workaround for possible input pop before marking - //the buffer reading position + //the buffer reading position char t = readCh(); unread(t); int bufferPosMark = readBufferPos; - + int end = readBufferPos + getEntityValue(name).length(); for (int k = readBufferPos; k < end; k++) { t = readCh(); if (t == '&') { - t = readCh(); + t = readCh(); if (t == '#') - { + { //try to match a character ref tryReadCharRef(); - + //everything has been read if (readBufferPos >= end) { @@ -2457,7 +2457,7 @@ loop2: unread(t); readNmtoken(true); require(';'); - + //everything has been read if (readBufferPos >= end) { @@ -2468,7 +2468,7 @@ loop2: } error(" malformed entity reference"); } - + } readBufferPos = bufferPosMark; break; @@ -2499,7 +2499,7 @@ loop2: throw new RuntimeException(); } } - + /** * Parse and expand a parameter entity reference. * <pre> @@ -2511,7 +2511,7 @@ loop2: throws SAXException, IOException { String name; - + name = "%" + readNmtoken(true); require(';'); switch (getEntityType(name)) @@ -2519,7 +2519,7 @@ loop2: case ENTITY_UNDECLARED: // VC: Entity Declared handler.verror("reference to undeclared parameter entity " + name); - + // we should disable handling of all subsequent declarations // unless this is a standalone document (info discarded) break; @@ -2546,7 +2546,7 @@ loop2: break; } } - + /** * Parse an entity declaration. * <pre> @@ -2566,7 +2566,7 @@ loop2: { boolean peFlag = false; int flags = 0; - + // Check for a parameter entity. expandPE = false; requireWhitespace(); @@ -2576,7 +2576,7 @@ loop2: requireWhitespace(); } expandPE = true; - + // Read the entity name, and prepend // '%' if necessary. String name = readNmtoken(true); @@ -2605,7 +2605,7 @@ loop2: { // Read the external IDs ExternalIdentifiers ids = readExternalIds(false, false); - + // Check for NDATA declaration. boolean white = tryWhitespace(); if (!peFlag && tryRead("NDATA")) @@ -2637,7 +2637,7 @@ loop2: : ids.systemId); } } - + // Finish the declaration. skipWhitespace(); require('>'); @@ -2672,11 +2672,11 @@ loop2: // Register the notation. setNotation(nname, ids); - + skipWhitespace(); require('>'); } - + /** * Parse character data. * <pre> @@ -2691,7 +2691,7 @@ loop2: boolean pureWhite = false; // assert (dataBufferPos == 0); - + // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) { @@ -2705,7 +2705,7 @@ loop2: int lineAugment = 0; int columnAugment = 0; int i; - + loop: for (i = readBufferPos; i < readBufferLength; i++) { @@ -2751,8 +2751,8 @@ loop: break; default: if ((c < 0x0020 || c > 0xFFFD) - || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) - && xmlVersion == XML_11)) + || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) + && xmlVersion == XML_11)) { error("illegal XML character U+" + Integer.toHexString(c)); @@ -2762,7 +2762,7 @@ loop: columnAugment++; } } - + // report text thus far if (lineAugment > 0) { @@ -2773,10 +2773,10 @@ loop: { column += columnAugment; } - + // report characters/whitspace int length = i - readBufferPos; - + if (length != 0) { if (pureWhite) @@ -2790,12 +2790,12 @@ loop: } readBufferPos = i; } - + if (state != 0) { break; } - + // fill next buffer from this entity, or // pop stack and continue with previous entity unread(readCh()); @@ -2810,11 +2810,11 @@ loop: error("character data may not contain ']]>'"); } } - + ////////////////////////////////////////////////////////////////////// // High-level reading and scanning methods. ////////////////////////////////////////////////////////////////////// - + /** * Require whitespace characters. */ @@ -2849,7 +2849,7 @@ loop: { int lineAugment = 0; int columnAugment = 0; - + loop: for (int i = readBufferPos; i < readBufferLength; i++) { @@ -2885,7 +2885,7 @@ loop: } } } - + // OK, do it the slow way. char c = readCh (); while (isWhitespace(c)) @@ -2894,7 +2894,7 @@ loop: } unread(c); } - + /** * Read a name or (when parsing an enumeration) name token. * <pre> @@ -2906,7 +2906,7 @@ loop: throws SAXException, IOException { char c; - + if (USE_CHEATS) { loop: @@ -2921,7 +2921,7 @@ loop: break loop; } // else fall through... - + // What may legitimately come AFTER a name/nmtoken? case '<': case '>': case '&': case ',': case '|': case '*': case '+': case '?': @@ -2939,10 +2939,10 @@ loop: } readBufferPos = i; return intern(readBuffer, start, i - start); - + default: // FIXME ... per IBM's OASIS test submission, these: - // ? U+06dd + // ? U+06dd // Combining U+309B //these switches are kind of ugly but at least we won't //have to go over the whole lits for each char @@ -2997,7 +2997,7 @@ loop: + Integer.toHexString(c)); } } - + break; //starting with 11 case 0x1100: @@ -3061,7 +3061,7 @@ loop: } break; default: - if (c == 0x0e46 || c == 0x1011 + if (c == 0x0e46 || c == 0x1011 || c == 0x212f || c == 0x0587 || c == 0x0230 ) { @@ -3091,7 +3091,7 @@ loop: } } } - + nameBufferPos = 0; // Read the first character. @@ -3128,7 +3128,7 @@ loop: return s; default: // punt on exact tests from Appendix A, but approximate them - + if ((nameBufferPos != 0 || !isName) && !Character.isUnicodeIdentifierPart(c) && ":-_.".indexOf(c) == -1 @@ -3147,7 +3147,7 @@ loop: } } } - + private static boolean isExtender(char c) { // [88] Extender ::= ... @@ -3178,7 +3178,7 @@ loop: int startLine = line; boolean saved = expandPE; boolean savedReport = doReport; - + // Find the first delimiter. delim = readCh(); if (delim != '"' && delim != '\'') @@ -3192,7 +3192,7 @@ loop: expandPE = false; } doReport = false; - + // Each level of input source has its own buffer; remember // ours, so we won't read the ending delimiter from any // other input source, regardless of entity processing. @@ -3235,11 +3235,11 @@ loop: break; } parseCharRef(false /* Do not do flushDataBuffer */); - + // exotic WFness risk: this is an entity literal, // dataBuffer [dataBufferPos - 1] == '&', and // following chars are a _partial_ entity/char ref - + // It looks like an entity ref ... } else @@ -3258,7 +3258,7 @@ loop: else if ((flags & LIT_DISABLE_EREF) != 0) { dataBufferAppend('&'); - + // OK, it will be an entity ref -- expanded later. } else @@ -3272,7 +3272,7 @@ loop: } c = readCh(); continue loop; - + case '<': // and why? Perhaps so "&foo;" expands the same // inside and outside an attribute? @@ -3283,7 +3283,7 @@ loop: break; // We don't worry about case '%' and PE refs, readCh does. - + default: break; } @@ -3299,17 +3299,17 @@ loop: inLiteral = false; expandPE = saved; doReport = savedReport; - + // Normalise whitespace if necessary. if ((flags & LIT_NORMALIZE) > 0) { dataBufferNormalize(); } - + // Return the value. return dataBufferToString(); } - + /** * Try reading external identifiers. * A system identifier is not required for notations. @@ -3325,7 +3325,7 @@ loop: char c; ExternalIdentifiers ids = new ExternalIdentifiers(); int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; - + if (tryRead("PUBLIC")) { requireWhitespace(); @@ -3345,7 +3345,7 @@ loop: requireWhitespace(); ids.systemId = readLiteral(flags); } - + for (int i = 0; i < ids.publicId.length(); i++) { c = ids.publicId.charAt(i); @@ -3374,7 +3374,7 @@ loop: { error("missing SYSTEM or PUBLIC keyword"); } - + if (ids.systemId != null) { if (ids.systemId.indexOf('#') != -1) @@ -3388,7 +3388,7 @@ loop: + ids.systemId); } } - + return ids; } @@ -3416,7 +3416,7 @@ loop: ////////////////////////////////////////////////////////////////////// // Utility routines. ////////////////////////////////////////////////////////////////////// - + /** * Add a character to the data buffer. */ @@ -3446,7 +3446,7 @@ loop: { dataBuffer = (char[]) extendArray(dataBuffer, dataBuffer.length, dataBufferPos + length); - + System.arraycopy(ch, start, dataBuffer, dataBufferPos, length); dataBufferPos += length; } @@ -3459,13 +3459,13 @@ loop: int i = 0; int j = 0; int end = dataBufferPos; - + // Skip spaces at the start. while (j < end && dataBuffer[j] == ' ') { j++; } - + // Skip whitespace at the end. while (end > j && dataBuffer[end - 1] == ' ') { @@ -3475,9 +3475,9 @@ loop: // Start copying to the left. while (j < end) { - + char c = dataBuffer[j++]; - + // Normalise all other spaces to // a single space. if (c == ' ') @@ -3494,7 +3494,7 @@ loop: dataBuffer[i++] = c; } } - + // The new length is <= the old one. dataBufferPos = i; } @@ -3554,7 +3554,7 @@ loop: { int length = delim.length(); char[] ch; - + if (length < dataBuffer.length) { ch = dataBuffer; @@ -3564,11 +3564,11 @@ loop: { ch = delim.toCharArray(); } - + if (USE_CHEATS && length <= (readBufferLength - readBufferPos)) { int offset = readBufferPos; - + for (int i = 0; i < length; i++, offset++) { if (ch[i] != readBuffer[offset]) @@ -3577,7 +3577,7 @@ loop: } } readBufferPos = offset; - + } else { @@ -3595,13 +3595,13 @@ loop: throws SAXException, IOException { char c = readCh(); - + if (c != delim) { error("required character", c, Character.toString(delim)); } } - + /** * Create an interned string from a character array. * Ælfred uses this method to create an interned version @@ -3631,13 +3631,13 @@ loop: hash = 31 * hash + ch[i]; } hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; - + // Get the bucket -- consists of {array,String} pairs if ((bucket = symbolTable[hash]) == null) { // first string in this bucket bucket = new Object[8]; - + // Search for a matching tuple, and // return the string if we find one. } @@ -3646,13 +3646,13 @@ loop: while (index < bucket.length) { char[] chFound = (char[]) bucket[index]; - + // Stop when we hit an empty entry. if (chFound == null) { break; } - + // If they're the same length, check for a match. if (chFound.length == length) { @@ -3673,12 +3673,12 @@ loop: index += 2; } // Not found -- we'll have to add it. - + // Do we have to grow the bucket? bucket = (Object[]) extendArray(bucket, bucket.length, index); } symbolTable[hash] = bucket; - + // OK, add it to the end of the bucket -- "local" interning. // Intern "globally" to let applications share interning benefits. // That is, "!=" and "==" work on our strings, not just equals(). @@ -3690,7 +3690,7 @@ loop: /** * Ensure the capacity of an array, allocating a new one if - * necessary. Usually extends only for name hash collisions. + * necessary. Usually extends only for name hash collisions. */ private Object extendArray(Object array, int currentSize, int requiredSize) { @@ -3702,12 +3702,12 @@ loop: { Object newArray = null; int newSize = currentSize * 2; - + if (newSize <= requiredSize) { newSize = requiredSize + 1; } - + if (array instanceof char[]) { newArray = new char[newSize]; @@ -3720,7 +3720,7 @@ loop: { throw new RuntimeException(); } - + System.arraycopy(array, 0, newArray, 0, currentSize); return newArray; } @@ -3729,20 +3729,20 @@ loop: ////////////////////////////////////////////////////////////////////// // XML query routines. ////////////////////////////////////////////////////////////////////// - + boolean isStandalone() { return docIsStandalone; } - + // // Elements // - + private int getContentType(ElementDecl element, int defaultType) { int retval; - + if (element == null) { return defaultType; @@ -3770,7 +3770,7 @@ loop: ElementDecl element = (ElementDecl) elementInfo.get(name); return getContentType(element, CONTENT_UNDECLARED); } - + /** * Register an element. * Array format: @@ -3788,7 +3788,7 @@ loop: } ElementDecl element = (ElementDecl) elementInfo.get(name); - + // first <!ELEMENT ...> or <!ATTLIST ...> for this type? if (element == null) { @@ -3799,7 +3799,7 @@ loop: elementInfo.put(name, element); return; } - + // <!ELEMENT ...> declaration? if (contentType != CONTENT_UNDECLARED) { @@ -3816,14 +3816,14 @@ loop: + name); } } - + // first <!ATTLIST ...>, before <!ELEMENT ...> ? else if (attributes != null) { element.attributes = attributes; } } - + /** * Look up the attribute hash table for an element. * The hash table is the second item in the element array. @@ -3837,7 +3837,7 @@ loop: // // Attributes // - + /** * Get the declared attributes for an element type. * @param elname The name of the element type. @@ -3853,7 +3853,7 @@ loop: private Iterator declaredAttributes(ElementDecl element) { HashMap attlist; - + if (element == null) { return null; @@ -3977,8 +3977,8 @@ loop: AttributeDecl attribute = getAttribute(name, aname); return (attribute == null) ? ATTRIBUTE_DEFAULT_UNDECLARED : attribute.valueType; - } - + } + /** * Register an attribute declaration for later retrieval. * Format: @@ -3993,19 +3993,19 @@ loop: throws Exception { HashMap attlist; - + if (skippedPE) { return; } - + // Create a new hashtable if necessary. attlist = getElementAttributes(elName); if (attlist == null) { attlist = new HashMap(); } - + // ignore multiple attribute declarations! if (attlist.get(name) != null) { @@ -4020,7 +4020,7 @@ loop: attribute.valueType = valueType; attribute.enumeration = enumeration; attlist.put(name, attribute); - + // save; but don't overwrite any existing <!ELEMENT ...> setElement(elName, CONTENT_UNDECLARED, null, attlist); } @@ -4038,7 +4038,7 @@ loop: // // Entities // - + /** * Find the type of an entity. * @returns An integer constant representing the entity type. @@ -4135,7 +4135,7 @@ loop: // // Notations. // - + /** * Report a notation declaration, checking for duplicates. */ @@ -4146,7 +4146,7 @@ loop: { return; } - + handler.notationDecl(nname, ids.publicId, ids.systemId, ids.baseUri); if (notationInfo.get(nname) == null) { @@ -4158,11 +4158,11 @@ loop: handler.verror("Duplicate notation name decl: " + nname); } } - + // // Location. // - + /** * Return the current line number. */ @@ -4182,7 +4182,7 @@ loop: ////////////////////////////////////////////////////////////////////// // High-level I/O. ////////////////////////////////////////////////////////////////////// - + /** * Read a single character from the readBuffer. * <p>The readDataChunk () method maintains the buffer. @@ -4223,16 +4223,16 @@ loop: } } break; - + default: - + popInput(); break; } } - + char c = readBuffer[readBufferPos++]; - + if (c == '\n') { line++; @@ -4245,7 +4245,7 @@ loop: /* the most common return to parseContent () ... NOP */ } else if (((c < 0x0020 && (c != '\t') && (c != '\r')) || c > 0xFFFD) - || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) + || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) && xmlVersion == XML_11)) { error("illegal XML character U+" + Integer.toHexString(c)); @@ -4274,7 +4274,7 @@ loop: * Push a single character back onto the current input stream. * <p>This method usually pushes the character back onto * the readBuffer. - * <p>I don't think that this would ever be called with + * <p>I don't think that this would ever be called with * readBufferPos = 0, because the methods always reads a character * before unreading it, but just in case, I've added a boundary * condition. @@ -4451,7 +4451,7 @@ loop: scratch.setCharacterStream(null); scratch.setByteStream(null); scratch.setEncoding(null); - + // Push the existing status. pushInput(ename); @@ -4475,7 +4475,7 @@ loop: tryEncodingDecl(true); return; } - + // Else we handle the conversion, and need to ensure // it's done right. sourceType = INPUT_STREAM; @@ -4487,12 +4487,12 @@ loop: { // We have to open our own stream to the URL. URL url = new URL(systemId); - + externalEntity = url.openConnection(); externalEntity.connect(); is = externalEntity.getInputStream(); } - + // If we get to here, there must be // an InputStream available. if (!is.markSupported()) @@ -4509,11 +4509,11 @@ loop: if (!"file".equals(externalEntity.getURL().getProtocol())) { int temp; - + // application/xml;charset=something;otherAttr=... // ... with many variants on 'something' encoding = externalEntity.getContentType(); - + // MHK code (fix for Saxon 5.5.1/007): // protect against encoding==null if (encoding == null) @@ -4524,7 +4524,7 @@ loop: { temp = encoding.indexOf("charset"); } - + // RFC 2376 sez MIME text defaults to ASCII, but since the // JDK will create a MIME type out of thin air, we always // autodetect when there's no explicit charset attribute. @@ -4539,11 +4539,11 @@ loop: { encoding = encoding.substring(0, temp); } - + if ((temp = encoding.indexOf('=', temp + 7)) > 0) { encoding = encoding.substring(temp + 1); - + // attributes can have comment fields (RFC 822) if ((temp = encoding.indexOf('(')) > 0) { @@ -4567,14 +4567,14 @@ loop: } } } - + // if we got an external encoding label, use it ... if (encoding != null) { this.encoding = ENCODING_EXTERNAL; setupDecoding(encoding); ignoreEncoding = true; - + // ... else autodetect from first bytes. } else @@ -4608,13 +4608,13 @@ loop: readBufferOverflow = -1; line = 1; currentByteCount = column = 0; - + sourceType = INPUT_READER; this.reader = new InputStreamReader(is, encoding); is = null; - + tryEncodingDecl(true); - + } catch (IOException e) { @@ -4672,7 +4672,7 @@ loop: /** * Attempt to detect the encoding of an entity. * <p>The trick here (as suggested in the XML standard) is that - * any entity not in UTF-8, or in UCS-2 with a byte-order mark, + * any entity not in UTF-8, or in UCS-2 with a byte-order mark, * <b>must</b> begin with an XML declaration or an encoding * declaration; we simply have to look for "<?xml" in various * encodings. @@ -4792,7 +4792,7 @@ loop: { // 4c 6f a7 94 ... we don't understand EBCDIC flavors // ... but we COULD at least kick in some fixed code page - + // (default) UTF-8 without encoding/XML declaration encoding = ENCODING_UTF_8; } @@ -4832,7 +4832,7 @@ loop: /** * This method pushes a string back onto input. - * <p>It is useful either as the expansion of an internal entity, + * <p>It is useful either as the expansion of an internal entity, * or for backtracking during the parse. * <p>Call pushCharArray () to do the actual work. * @param s The string to push back onto input. @@ -4918,13 +4918,13 @@ loop: } } entityStack.addLast(ename); - + // Don't bother if there is no current input. if (sourceType == INPUT_NONE) { return; } - + // Set up a snapshot of the current // input source. Input input = new Input(); @@ -4941,7 +4941,7 @@ loop: input.currentByteCount = currentByteCount; input.column = column; input.reader = reader; - + // Push it onto the stack. inputStack.addLast(input); } @@ -5010,7 +5010,7 @@ loop: column = input.column; reader = input.reader; } - + /** * Return true if we can read the expected character. * <p>Note that the character will be removed from the input stream @@ -5026,7 +5026,7 @@ loop: throws SAXException, IOException { char c; - + // Read the character c = readCh(); @@ -5069,7 +5069,7 @@ loop: // Compare the input, character- // by character. - + for (int i = 0; i < ch.length; i++) { c = readCh(); @@ -5109,7 +5109,7 @@ loop: return false; } } - + /** * Read all data until we find the specified string. * This is useful for scanning CDATA sections and PIs. @@ -5130,7 +5130,7 @@ loop: { char c; int startLine = line; - + try { while (!tryRead(delim)) @@ -5150,7 +5150,7 @@ loop: ////////////////////////////////////////////////////////////////////// // Low-level I/O. ////////////////////////////////////////////////////////////////////// - + /** * Prefetch US-ASCII XML/text decl from input stream into read buffer. * Doesn't buffer more than absolutely needed, so that when an encoding @@ -5163,7 +5163,7 @@ loop: { int ch; readBufferPos = readBufferLength = 0; - + is.mark(readBuffer.length); while (true) { @@ -5201,7 +5201,7 @@ loop: throws SAXException, IOException { int count; - + // See if we have any overflow (filterCR sets for CR at end) if (readBufferOverflow > -1) { @@ -5236,7 +5236,7 @@ loop: sawCR = false; return; } - + // Read as many bytes as possible into the raw buffer. count = is.read(rawReadBuffer, 0, READ_BUFFER_MAX); @@ -5265,7 +5265,7 @@ loop: case ENCODING_UCS_2_21: copyUcs2ReadBuffer(count, 0, 8); break; - + // four byte builtins case ENCODING_UCS_4_1234: copyUcs4ReadBuffer(count, 24, 16, 8, 0); @@ -5287,27 +5287,27 @@ loop: } readBufferPos = 0; - + // Filter out all carriage returns if we've seen any // (including any saved from a previous read) if (sawCR) { filterCR(count >= 0); sawCR = false; - + // must actively report EOF, lest some CRs get lost. if (readBufferLength == 0 && count >= 0) { readDataChunk(); } } - + if (count > 0) { currentByteCount += count; } } - + /** * Filter carriage returns in the read buffer. * CRLF becomes LF; CR becomes LF. @@ -5321,7 +5321,7 @@ loop: int i, j; readBufferOverflow = -1; - + loop: for (i = j = readBufferPos; j < readBufferLength; i++, j++) { @@ -5359,8 +5359,8 @@ loop: /** * Convert a buffer of UTF-8-encoded bytes into UTF-16 characters. - * <p>When readDataChunk () calls this method, the raw bytes are in - * rawReadBuffer, and the final characters will appear in + * <p>When readDataChunk () calls this method, the raw bytes are in + * rawReadBuffer, and the final characters will appear in * readBuffer. * <p>Note that as of Unicode 3.1, good practice became a requirement, * so that each Unicode character has exactly one UTF-8 representation. @@ -5377,7 +5377,7 @@ loop: int j = readBufferPos; int b1; char c = 0; - + /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) @@ -5403,7 +5403,7 @@ loop: encodingError("Illegal two byte UTF-8 sequence", c, 0); } - + //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 @@ -5411,10 +5411,10 @@ loop: { continue; } - + // Sec 2.11 // [3] the single character #x85 - + if (c == 0x0085 && xmlVersion == XML_11) { readBuffer[j++] = '\r'; @@ -5453,7 +5453,7 @@ loop: iso646 = (iso646 << 6) + getNextUtf8Byte(i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte(i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte(i++, count); - + if (iso646 <= 0xffff) { encodingError("Illegal four byte UTF-8 sequence", @@ -5497,7 +5497,7 @@ loop: // How many characters have we read? readBufferLength = j; } - + /** * Return the next byte value in a UTF-8 sequence. * If it is not possible to get a byte from the current @@ -5512,7 +5512,7 @@ loop: throws SAXException, IOException { int val; - + // Take a character from the buffer // or from the actual input stream. if (pos < count) @@ -5544,8 +5544,8 @@ loop: * Convert a buffer of US-ASCII or ISO-8859-1-encoded bytes into * UTF-16 characters. * - * <p>When readDataChunk () calls this method, the raw bytes are in - * rawReadBuffer, and the final characters will appear in + * <p>When readDataChunk () calls this method, the raw bytes are in + * rawReadBuffer, and the final characters will appear in * readBuffer. * * @param count The number of bytes to convert. @@ -5583,8 +5583,8 @@ loop: * Convert a buffer of UCS-2-encoded bytes into UTF-16 characters * (as used in Java string manipulation). * - * <p>When readDataChunk () calls this method, the raw bytes are in - * rawReadBuffer, and the final characters will appear in + * <p>When readDataChunk () calls this method, the raw bytes are in + * rawReadBuffer, and the final characters will appear in * readBuffer. * @param count The number of bytes to convert. * @param shift1 The number of bits to shift byte 1. @@ -5597,7 +5597,7 @@ loop: throws SAXException { int j = readBufferPos; - + if (count > 0 && (count % 2) != 0) { encodingError("odd number of bytes in UCS-2 encoding", -1, count); @@ -5635,8 +5635,8 @@ loop: /** * Convert a buffer of UCS-4-encoded bytes into UTF-16 characters. * - * <p>When readDataChunk () calls this method, the raw bytes are in - * rawReadBuffer, and the final characters will appear in + * <p>When readDataChunk () calls this method, the raw bytes are in + * rawReadBuffer, and the final characters will appear in * readBuffer. * <p>Java has Unicode chars, and this routine uses surrogate pairs * for ISO-10646 values between 0x00010000 and 0x000fffff. An @@ -5657,7 +5657,7 @@ loop: throws SAXException { int j = readBufferPos; - + if (count > 0 && (count % 4) != 0) { encodingError("number of bytes in UCS-4 encoding " + @@ -5706,11 +5706,11 @@ loop: error(message); } } - + ////////////////////////////////////////////////////////////////////// // Local Variables. ////////////////////////////////////////////////////////////////////// - + /** * Re-initialize the variables for each parse. */ @@ -5719,7 +5719,7 @@ loop: // First line line = 1; column = 0; - + // Set up the buffers for data and names dataBufferPos = 0; dataBuffer = new char[DATA_BUFFER_INITIAL]; @@ -5736,7 +5736,7 @@ loop: // element context. currentElement = null; currentElementContent = CONTENT_UNDECLARED; - + // Set up the input variables sourceType = INPUT_NONE; inputStack = new LinkedList(); @@ -5752,11 +5752,11 @@ loop: inLiteral = false; expandPE = false; peIsError = false; - + doReport = false; - + inCDATA = false; - + symbolTable = new Object[SYMBOL_TABLE_LENGTH][]; } @@ -5777,7 +5777,7 @@ loop: this.systemId = systemId; this.baseUri = baseUri; } - + } static class EntityInfo @@ -5787,12 +5787,12 @@ loop: ExternalIdentifiers ids; String value; String notationName; - + } static class AttributeDecl { - + String type; String value; int valueType; @@ -5803,16 +5803,16 @@ loop: static class ElementDecl { - + int contentType; String contentModel; HashMap attributes; - + } - + static class Input { - + int sourceType; URLConnection externalEntity; char[] readBuffer; @@ -5825,8 +5825,7 @@ loop: int currentByteCount; int column; Reader reader; - + } - -} +} diff --git a/libjava/classpath/gnu/xml/aelfred2/XmlReader.java b/libjava/classpath/gnu/xml/aelfred2/XmlReader.java index a3bd03a..e0a0476 100644 --- a/libjava/classpath/gnu/xml/aelfred2/XmlReader.java +++ b/libjava/classpath/gnu/xml/aelfred2/XmlReader.java @@ -1,4 +1,4 @@ -/* XmlReader.java -- +/* XmlReader.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -77,15 +77,15 @@ public final class XmlReader static class FatalErrorHandler extends DefaultHandler2 { - + public void error(SAXParseException e) throws SAXException { throw e; } - + } - + private SAXDriver aelfred2 = new SAXDriver(); private EventFilter filter = new EventFilter(); private boolean isValidating; @@ -109,7 +109,7 @@ public final class XmlReader setErrorHandler(new FatalErrorHandler()); } } - + /** * <b>SAX2</b>: Returns the object used to report the logical * content of an XML document. @@ -154,7 +154,7 @@ public final class XmlReader } filter.setDTDHandler(handler); } - + /** * <b>SAX2</b>: Returns the object used when resolving external * entities during parsing (both general and parameter entities). @@ -224,7 +224,7 @@ public final class XmlReader } throw new SAXNotRecognizedException(propertyId); } - + private void forceValidating() throws SAXNotRecognizedException, SAXNotSupportedException { @@ -371,4 +371,3 @@ public final class XmlReader } } - diff --git a/libjava/classpath/gnu/xml/dom/Consumer.java b/libjava/classpath/gnu/xml/dom/Consumer.java index 026e275..836c8d2 100644 --- a/libjava/classpath/gnu/xml/dom/Consumer.java +++ b/libjava/classpath/gnu/xml/dom/Consumer.java @@ -1,4 +1,4 @@ -/* Consumer.java -- +/* Consumer.java -- Copyright (C) 2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -81,8 +81,8 @@ public class Consumer extends DomConsumer public Consumer () throws SAXException { - super (DomDocument.class); - setHandler (new Backdoor (this)); + super (DomDocument.class); + setHandler (new Backdoor (this)); } /** @@ -93,8 +93,8 @@ public class Consumer extends DomConsumer public Consumer (EventConsumer next) throws SAXException { - super (DomDocument.class, next); - setHandler (new Backdoor (this)); + super (DomDocument.class, next); + setHandler (new Backdoor (this)); } /** @@ -105,160 +105,160 @@ public class Consumer extends DomConsumer */ public static class Backdoor extends DomConsumer.Handler { - /** - * Constructor. - * @param consumer must have been initialized to use the - * {@link DomDocument} class (or a subclass) for - * constructing DOM trees - */ - protected Backdoor (DomConsumer consumer) - throws SAXException - { super (consumer); } - - // helper routine - private DomDoctype getDoctype () - throws SAXException - { - DomDocument doc = (DomDocument) getDocument (); - DocumentType dt = doc.getDoctype (); - - if (dt == null) - throw new SAXException ("doctype missing!"); - return (DomDoctype) dt; - } - - // SAX2 "lexical" event - public void startDTD (String name, String publicId, String systemId) - throws SAXException - { - DomDocument doc = (DomDocument) getDocument (); - - super.startDTD (name, publicId, systemId); - // DOM L2 doctype creation model is bizarre - DomDoctype dt = new DomDoctype (doc, name, publicId, systemId); - doc.appendChild (dt); - } - - // SAX2 "lexical" event - public void endDTD () - throws SAXException - { - super.endDTD (); - // DOM L2 has no way to make things readonly - getDoctype ().makeReadonly (); - } - - // SAX1 DTD event - public void notationDecl ( - String name, - String publicId, String systemId - ) throws SAXException - { - // DOM L2 can't create/save notation nodes - getDoctype ().declareNotation (name, publicId, systemId); - } - - // SAX1 DTD event - public void unparsedEntityDecl ( - String name, - String publicId, String systemId, - String notationName - ) throws SAXException - { - // DOM L2 can't create/save entity nodes - getDoctype ().declareEntity (name, publicId, systemId, - notationName); - } - - // SAX2 declaration event - public void internalEntityDecl (String name, String value) - throws SAXException - { - // DOM L2 can't create/save entity nodes - // NOTE: this doesn't save the value as a child of this - // node, though it could realistically do so. - getDoctype ().declareEntity (name, null, null, null); - } - - // SAX2 declaration event - public void externalEntityDecl ( - String name, - String publicId, - String systemId - ) throws SAXException - { - // DOM L2 can't create/save entity nodes - // NOTE: DOM allows for these to have children, if - // they don't have unbound namespace references. - getDoctype ().declareEntity (name, publicId, systemId, null); - } - - // SAX2 element - public void startElement ( - String uri, - String localName, - String qName, - Attributes atts - ) throws SAXException - { - Node top; - - super.startElement (uri, localName, qName, atts); - - // might there be more work? - top = getTop (); - if (!top.hasAttributes () || !(atts instanceof Attributes2)) - return; - - // remember any attributes that got defaulted - DomNamedNodeMap map = (DomNamedNodeMap) top.getAttributes (); - Attributes2 attrs = (Attributes2) atts; - int length = atts.getLength (); - - //map.compact (); - for (int i = 0; i < length; i++) { - if (attrs.isSpecified (i)) - continue; - - // value was defaulted. - String temp = attrs.getQName (i); - DomAttr attr; - - if ("".equals (temp)) - attr = (DomAttr) map.getNamedItemNS (attrs.getURI (i), - atts.getLocalName (i)); - else - attr = (DomAttr) map.getNamedItem (temp); - - // DOM L2 can't write this flag, only read it - attr.setSpecified (false); - } - } - - public void endElement ( - String uri, - String localName, - String qName - ) throws SAXException - { - DomNode top = (DomNode) getTop (); - top.compact (); - super.endElement (uri, localName, qName); - } - - protected Text createText ( - boolean isCDATA, - char buf [], - int off, - int len - ) { - DomDocument doc = (DomDocument) getDocument (); - - if (isCDATA) - return doc.createCDATASection (buf, off, len); - else - return doc.createTextNode (buf, off, len); - } + /** + * Constructor. + * @param consumer must have been initialized to use the + * {@link DomDocument} class (or a subclass) for + * constructing DOM trees + */ + protected Backdoor (DomConsumer consumer) + throws SAXException + { super (consumer); } + + // helper routine + private DomDoctype getDoctype () + throws SAXException + { + DomDocument doc = (DomDocument) getDocument (); + DocumentType dt = doc.getDoctype (); + + if (dt == null) + throw new SAXException ("doctype missing!"); + return (DomDoctype) dt; + } + + // SAX2 "lexical" event + public void startDTD (String name, String publicId, String systemId) + throws SAXException + { + DomDocument doc = (DomDocument) getDocument (); + + super.startDTD (name, publicId, systemId); + // DOM L2 doctype creation model is bizarre + DomDoctype dt = new DomDoctype (doc, name, publicId, systemId); + doc.appendChild (dt); + } + + // SAX2 "lexical" event + public void endDTD () + throws SAXException + { + super.endDTD (); + // DOM L2 has no way to make things readonly + getDoctype ().makeReadonly (); + } + + // SAX1 DTD event + public void notationDecl ( + String name, + String publicId, String systemId + ) throws SAXException + { + // DOM L2 can't create/save notation nodes + getDoctype ().declareNotation (name, publicId, systemId); + } + + // SAX1 DTD event + public void unparsedEntityDecl ( + String name, + String publicId, String systemId, + String notationName + ) throws SAXException + { + // DOM L2 can't create/save entity nodes + getDoctype ().declareEntity (name, publicId, systemId, + notationName); + } + + // SAX2 declaration event + public void internalEntityDecl (String name, String value) + throws SAXException + { + // DOM L2 can't create/save entity nodes + // NOTE: this doesn't save the value as a child of this + // node, though it could realistically do so. + getDoctype ().declareEntity (name, null, null, null); + } + + // SAX2 declaration event + public void externalEntityDecl ( + String name, + String publicId, + String systemId + ) throws SAXException + { + // DOM L2 can't create/save entity nodes + // NOTE: DOM allows for these to have children, if + // they don't have unbound namespace references. + getDoctype ().declareEntity (name, publicId, systemId, null); + } + + // SAX2 element + public void startElement ( + String uri, + String localName, + String qName, + Attributes atts + ) throws SAXException + { + Node top; + + super.startElement (uri, localName, qName, atts); + + // might there be more work? + top = getTop (); + if (!top.hasAttributes () || !(atts instanceof Attributes2)) + return; + + // remember any attributes that got defaulted + DomNamedNodeMap map = (DomNamedNodeMap) top.getAttributes (); + Attributes2 attrs = (Attributes2) atts; + int length = atts.getLength (); + + //map.compact (); + for (int i = 0; i < length; i++) { + if (attrs.isSpecified (i)) + continue; + + // value was defaulted. + String temp = attrs.getQName (i); + DomAttr attr; + + if ("".equals (temp)) + attr = (DomAttr) map.getNamedItemNS (attrs.getURI (i), + atts.getLocalName (i)); + else + attr = (DomAttr) map.getNamedItem (temp); + + // DOM L2 can't write this flag, only read it + attr.setSpecified (false); + } + } + + public void endElement ( + String uri, + String localName, + String qName + ) throws SAXException + { + DomNode top = (DomNode) getTop (); + top.compact (); + super.endElement (uri, localName, qName); + } + + protected Text createText ( + boolean isCDATA, + char buf [], + int off, + int len + ) { + DomDocument doc = (DomDocument) getDocument (); + + if (isCDATA) + return doc.createCDATASection (buf, off, len); + else + return doc.createTextNode (buf, off, len); + } public void elementDecl(String name, String model) throws SAXException @@ -266,87 +266,87 @@ public class Consumer extends DomConsumer getDoctype().elementDecl(name, model); } - public void attributeDecl ( - String ename, - String aname, - String type, - String mode, - String value - ) throws SAXException - { + public void attributeDecl ( + String ename, + String aname, + String type, + String mode, + String value + ) throws SAXException + { getDoctype().attributeDecl(ename, aname, type, mode, value); /* - if (value == null && !"ID".equals (type)) - return; - - DomDoctype.ElementInfo info; - - info = getDoctype ().getElementInfo (ename); - if (value != null) - info.setAttrDefault (aname, value); - if ("ID".equals (type)) - info.setIdAttr (aname); + if (value == null && !"ID".equals (type)) + return; + + DomDoctype.ElementInfo info; + + info = getDoctype ().getElementInfo (ename); + if (value != null) + info.setAttrDefault (aname, value); + if ("ID".equals (type)) + info.setIdAttr (aname); */ - - } - - // force duplicate name checking off while we're - // using parser output (don't duplicate the work) - public void startDocument () throws SAXException - { - super.startDocument (); - + + } + + // force duplicate name checking off while we're + // using parser output (don't duplicate the work) + public void startDocument () throws SAXException + { + super.startDocument (); + DomDocument doc = (DomDocument) getDocument (); doc.setStrictErrorChecking(false); doc.setBuilding(true); - } + } - public void endDocument () - throws SAXException - { - DomDocument doc = (DomDocument) getDocument (); - doc.setStrictErrorChecking(true); + public void endDocument () + throws SAXException + { + DomDocument doc = (DomDocument) getDocument (); + doc.setStrictErrorChecking(true); doc.setBuilding(false); - doc.compact (); + doc.compact (); DomDoctype doctype = (DomDoctype) doc.getDoctype(); if (doctype != null) { doctype.makeReadonly(); } - super.endDocument (); - } - - // these three methods collaborate to populate entity - // refs, marking contents readonly on end-of-entity - - public boolean canPopulateEntityRefs () - { return true; } - - public void startEntity (String name) - throws SAXException - { - if (name.charAt (0) == '%' || "[dtd]".equals (name)) - return; - super.startEntity (name); - - DomNode top = (DomNode) getTop (); - - if (top.getNodeType () == Node.ENTITY_REFERENCE_NODE) - top.readonly = false; - } - - public void endEntity (String name) - throws SAXException - { - if (name.charAt (0) == '%' || "[dtd]".equals (name)) - return; - DomNode top = (DomNode) getTop (); - - if (top.getNodeType () == Node.ENTITY_REFERENCE_NODE) { - top.compact (); - top.makeReadonly (); - } - super.endEntity (name); - } + super.endDocument (); + } + + // these three methods collaborate to populate entity + // refs, marking contents readonly on end-of-entity + + public boolean canPopulateEntityRefs () + { return true; } + + public void startEntity (String name) + throws SAXException + { + if (name.charAt (0) == '%' || "[dtd]".equals (name)) + return; + super.startEntity (name); + + DomNode top = (DomNode) getTop (); + + if (top.getNodeType () == Node.ENTITY_REFERENCE_NODE) + top.readonly = false; + } + + public void endEntity (String name) + throws SAXException + { + if (name.charAt (0) == '%' || "[dtd]".equals (name)) + return; + DomNode top = (DomNode) getTop (); + + if (top.getNodeType () == Node.ENTITY_REFERENCE_NODE) { + top.compact (); + top.makeReadonly (); + } + super.endEntity (name); + } } } diff --git a/libjava/classpath/gnu/xml/dom/DTDAttributeTypeInfo.java b/libjava/classpath/gnu/xml/dom/DTDAttributeTypeInfo.java index e3c69c4..d6e2552 100644 --- a/libjava/classpath/gnu/xml/dom/DTDAttributeTypeInfo.java +++ b/libjava/classpath/gnu/xml/dom/DTDAttributeTypeInfo.java @@ -1,4 +1,4 @@ -/* DTDAttributeTypeInfo.java -- +/* DTDAttributeTypeInfo.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -81,4 +81,3 @@ class DTDAttributeTypeInfo } } - diff --git a/libjava/classpath/gnu/xml/dom/DTDElementTypeInfo.java b/libjava/classpath/gnu/xml/dom/DTDElementTypeInfo.java index c5553e2..9063d4c 100644 --- a/libjava/classpath/gnu/xml/dom/DTDElementTypeInfo.java +++ b/libjava/classpath/gnu/xml/dom/DTDElementTypeInfo.java @@ -1,4 +1,4 @@ -/* DTDElementTypeInfo.java -- +/* DTDElementTypeInfo.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -107,6 +107,5 @@ class DTDElementTypeInfo } return attributes.values().iterator(); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomAttr.java b/libjava/classpath/gnu/xml/dom/DomAttr.java index 6a8da83..421baf7 100644 --- a/libjava/classpath/gnu/xml/dom/DomAttr.java +++ b/libjava/classpath/gnu/xml/dom/DomAttr.java @@ -1,4 +1,4 @@ -/* DomAttr.java -- +/* DomAttr.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -65,7 +65,7 @@ import org.w3c.dom.events.MutationEvent; * methods (setNodeValue, setValue, and Element.setAttribute) to modify * those values. That is, if you manipulate those children directly, * elements won't get notified that attribute values have changed. - * The natural fix for that will report other modifications, but won't + * The natural fix for that will report other modifications, but won't * be able to expose "previous" attribute value; it'll need to be cached * or something (at which point why bother using child nodes). </p> * @@ -79,10 +79,10 @@ public class DomAttr extends DomNsNode implements Attr { - + private boolean specified; private String value; // string value cache - + /** * Constructs an Attr node associated with the specified document. * The "specified" flag is initialized to true, since this DOM has @@ -95,7 +95,7 @@ public class DomAttr * * @param owner The document with which this node is associated * @param namespaceURI Combined with the local part of the name, - * this is used to uniquely identify a type of attribute + * this is used to uniquely identify a type of attribute * @param name Name of this attribute, which may include a prefix */ protected DomAttr(DomDocument owner, String namespaceURI, String name) @@ -103,7 +103,7 @@ public class DomAttr super(ATTRIBUTE_NODE, owner, namespaceURI, name); specified = true; length = 1; - + // XXX register self to get insertion/removal events // and character data change events and when they happen, // report self-mutation @@ -121,18 +121,18 @@ public class DomAttr * <p> * With this constructor, the prefix and local part are given explicitly * rather than being computed. This allows them to be explicitly set to - * {@code null} as required by {@link Document#createAttribute(String)}. + * {@code null} as required by {@link Document#createAttribute(String)}. * </p> * * @param owner The document with which this node is associated * @param namespaceURI Combined with the local part of the name, - * this is used to uniquely identify a type of attribute + * this is used to uniquely identify a type of attribute * @param name Name of this attribute, which may include a prefix * @param prefix the namespace prefix of the name. May be {@code null}. * @param localName the local part of the name. May be {@code null}. */ protected DomAttr(DomDocument owner, String namespaceURI, String name, - String prefix, String localName) + String prefix, String localName) { super(ATTRIBUTE_NODE, owner, namespaceURI, name, prefix, localName); specified = true; @@ -147,7 +147,7 @@ public class DomAttr { return getNodeName(); } - + /** * <b>DOM L1</b> * Returns true if a parser reported this was in the source text. @@ -156,7 +156,7 @@ public class DomAttr { return specified; } - + /** * Records whether this attribute was in the source text. */ @@ -194,7 +194,7 @@ public class DomAttr } return buf.toString(); } - + /** * <b>DOM L1</b> * Assigns the value of the attribute; it will have one child, @@ -205,7 +205,7 @@ public class DomAttr { setNodeValue(value); } - + /** * <b>DOM L1</b> * Returns the value of the attribute as a non-null string; same @@ -216,7 +216,7 @@ public class DomAttr { return getNodeValue(); } - + /** * <b>DOM L1</b> * Assigns the attribute value; using this API, no entity or @@ -246,7 +246,7 @@ public class DomAttr this.value = value; length = 1; specified = true; - + mutating(oldValue, value, MutationEvent.MODIFICATION); } @@ -334,7 +334,7 @@ public class DomAttr { return null; } - + /** * Shallow clone of the attribute, breaking all ties with any * elements. @@ -345,18 +345,18 @@ public class DomAttr retval.specified = true; return retval; } - + private void mutating(String oldValue, String newValue, short why) { if (!reportMutations || parent == null || equal(newValue, oldValue)) { return; } - + // EVENT: DOMAttrModified, target = parent, - // prev/new values provided, also attr name - MutationEvent event; - + // prev/new values provided, also attr name + MutationEvent event; + event = (MutationEvent) createEvent ("MutationEvents"); event.initMutationEvent ("DOMAttrModified", true /* bubbles */, false /* nocancel */, @@ -365,7 +365,7 @@ public class DomAttr } // DOM Level 3 methods - + public TypeInfo getSchemaTypeInfo() { if (parent != null) @@ -409,4 +409,3 @@ public class DomAttr } } - diff --git a/libjava/classpath/gnu/xml/dom/DomCDATASection.java b/libjava/classpath/gnu/xml/dom/DomCDATASection.java index e34359e..770f7d5 100644 --- a/libjava/classpath/gnu/xml/dom/DomCDATASection.java +++ b/libjava/classpath/gnu/xml/dom/DomCDATASection.java @@ -1,4 +1,4 @@ -/* DomCDATASection.java -- +/* DomCDATASection.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -58,7 +58,7 @@ public class DomCDATASection extends DomText implements CDATASection { - + /** * Constructs a CDATA section node associated with the specified * document and holding the specified data. @@ -86,6 +86,5 @@ public class DomCDATASection { return "#cdata-section"; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomCharacterData.java b/libjava/classpath/gnu/xml/dom/DomCharacterData.java index 1eec5be..396c5f7 100644 --- a/libjava/classpath/gnu/xml/dom/DomCharacterData.java +++ b/libjava/classpath/gnu/xml/dom/DomCharacterData.java @@ -1,4 +1,4 @@ -/* DomCharacterData.java -- +/* DomCharacterData.java -- Copyright (C) 1999,2000,2001,2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -73,7 +73,7 @@ public abstract class DomCharacterData { return null; } - + } /** @@ -82,7 +82,7 @@ public abstract class DomCharacterData static final NodeList CHILD_NODES = new EmptyNodeList(); private String text; - + // package private DomCharacterData(short nodeType, DomDocument doc, String value) { @@ -113,7 +113,7 @@ public abstract class DomCharacterData mutating(value); text = value; } - + /** * <b>DOM L1</b> * Modifies the value of this node. @@ -153,7 +153,7 @@ public abstract class DomCharacterData throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } } - + /** * <b>DOM L1</b> * Returns the value of this node. @@ -162,7 +162,7 @@ public abstract class DomCharacterData { return text; } - + /** * <b>DOM L1</b> * Returns the value of this node; same as getNodeValue. @@ -180,7 +180,7 @@ public abstract class DomCharacterData { return text.length(); } - + /** * <b>DOM L1</b> * Modifies the value of this node. @@ -194,7 +194,7 @@ public abstract class DomCharacterData char[] raw = text.toCharArray(); char[] tmp = arg.toCharArray (); char[] buf = new char[raw.length + tmp.length]; - + try { System.arraycopy(raw, 0, buf, 0, offset); @@ -210,7 +210,7 @@ public abstract class DomCharacterData throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } } - + /** * <b>DOM L1</b> * Modifies the value of this node. Causes DOMCharacterDataModified @@ -223,7 +223,7 @@ public abstract class DomCharacterData throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } char[] raw = text.toCharArray(); - + // deleteData if (offset < 0 || count < 0 || offset > raw.length) { @@ -239,7 +239,7 @@ public abstract class DomCharacterData System.arraycopy(raw, 0, buf, 0, offset); System.arraycopy(raw, offset + count, buf, offset, raw.length - (offset + count)); - + // insertData char[] tmp = arg.toCharArray (); char[] buf2 = new char[buf.length + tmp.length]; @@ -256,7 +256,7 @@ public abstract class DomCharacterData throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } } - + /** * <b>DOM L1</b> * Assigns the value of this node. @@ -275,7 +275,7 @@ public abstract class DomCharacterData mutating(value); text = value; } - + /** * <b>DOM L1</b> * Assigns the value of this node; same as setNodeValue. @@ -329,17 +329,16 @@ public abstract class DomCharacterData { return; } - + // EVENT: DOMCharacterDataModified, target = this, // prev/new values provided MutationEvent event; - + event = (MutationEvent) createEvent("MutationEvents"); event.initMutationEvent("DOMCharacterDataModified", true /* bubbles */, false /* nocancel */, null, text, newValue, null, (short) 0); dispatchEvent(event); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomComment.java b/libjava/classpath/gnu/xml/dom/DomComment.java index 71c8160..5be6bd5 100644 --- a/libjava/classpath/gnu/xml/dom/DomComment.java +++ b/libjava/classpath/gnu/xml/dom/DomComment.java @@ -1,4 +1,4 @@ -/* DomComment.java -- +/* DomComment.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,7 +54,7 @@ public class DomComment extends DomCharacterData implements Comment { - + /** * Constructs a comment node associated with the specified * document and holding the specified data. @@ -67,7 +67,7 @@ public class DomComment { super(COMMENT_NODE, owner, value); } - + /** * <b>DOM L1</b> * Returns the string "#comment". @@ -78,4 +78,3 @@ public class DomComment } } - diff --git a/libjava/classpath/gnu/xml/dom/DomDOMException.java b/libjava/classpath/gnu/xml/dom/DomDOMException.java index cf93fcf..4a3ba7a 100644 --- a/libjava/classpath/gnu/xml/dom/DomDOMException.java +++ b/libjava/classpath/gnu/xml/dom/DomDOMException.java @@ -1,4 +1,4 @@ -/* DomDOMException.java -- +/* DomDOMException.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,7 +48,7 @@ import org.w3c.dom.Node; * that is being reported, in terms of the relevant DOM structures * and data. * - * @author David Brownell + * @author David Brownell */ public class DomDOMException extends DOMException @@ -56,13 +56,13 @@ public class DomDOMException /** @serial Data that caused an error to be reported */ private String data; - + /** @serial Node associated with the error. */ private Node node; - + /** @serial Data associated with the error. */ private int value; - + /** * Constructs an exception, with the diagnostic message * corresponding to the specified code. @@ -71,7 +71,7 @@ public class DomDOMException { super(code, diagnostic(code)); } - + /** * Constructs an exception, with the diagnostic message * corresponding to the specified code and additional @@ -110,7 +110,7 @@ public class DomDOMException public String getMessage() { String retval = super.getMessage(); - + if (data != null) { retval += "\nMore Information: " + data; @@ -127,11 +127,11 @@ public class DomDOMException } // these strings should be localizable. - + private static String diagnostic(short code) { switch (code) - { + { // DOM L1: case INDEX_SIZE_ERR: return "An index or size is out of range."; @@ -153,7 +153,7 @@ public class DomDOMException return "That object is not supported."; case INUSE_ATTRIBUTE_ERR: return "The attribute belongs to a different element."; - + // DOM L2: case INVALID_STATE_ERR: return "The object is not usable."; @@ -172,4 +172,3 @@ public class DomDOMException } } - diff --git a/libjava/classpath/gnu/xml/dom/DomDoctype.java b/libjava/classpath/gnu/xml/dom/DomDoctype.java index d35eedc..ecf7a95 100644 --- a/libjava/classpath/gnu/xml/dom/DomDoctype.java +++ b/libjava/classpath/gnu/xml/dom/DomDoctype.java @@ -1,4 +1,4 @@ -/* DomDoctype.java -- +/* DomDoctype.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -72,22 +72,22 @@ import org.w3c.dom.Notation; * @see DomEntityReference * @see DomNotation * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomDoctype extends DomExtern implements DocumentType { - + private DomNamedNodeMap notations; private DomNamedNodeMap entities; private final DOMImplementation implementation; private String subset; - + private HashMap elements = new HashMap(); private boolean ids; - + /** * Constructs a DocumentType node associated with the specified * implementation, with the specified name. @@ -103,11 +103,11 @@ public class DomDoctype * @param impl The implementation with which this object is associated * @param name Name of this root element * @param publicId If non-null, provides the external subset's - * PUBLIC identifier + * PUBLIC identifier * @param systemId If non-null, provides the external subset's - * SYSTEM identifier + * SYSTEM identifier * @param internalSubset Provides the literal value (unparsed, no - * entities expanded) of the DTD's internal subset. + * entities expanded) of the DTD's internal subset. */ protected DomDoctype(DOMImplementation impl, String name, @@ -154,7 +154,7 @@ public class DomDoctype * then it doesn't have the strange construction rules of L2.</em> * * @exception DOMException HIERARCHY_REQUEST_ERR if the DocumentType - * is not associated with a document. + * is not associated with a document. */ public NamedNodeMap getEntities() { @@ -172,15 +172,15 @@ public class DomDoctype * @param publicId If non-null, provides the entity's PUBLIC identifier * @param systemId Provides the entity's SYSTEM identifier * @param notation If non-null, provides the entity's notation - * (indicating an unparsed entity) + * (indicating an unparsed entity) * @return The Entity that was declared, or null if the entity wasn't - * recorded (because it's a parameter entity or because an entity with - * this name was already declared). + * recorded (because it's a parameter entity or because an entity with + * this name was already declared). * * @exception DOMException NO_MODIFICATION_ALLOWED_ERR if the - * DocumentType is no longer writable. + * DocumentType is no longer writable. * @exception DOMException HIERARCHY_REQUEST_ERR if the DocumentType - * is not associated with a document. + * is not associated with a document. */ public Entity declareEntity(String name, String publicId, @@ -188,7 +188,7 @@ public class DomDoctype String notation) { DomEntity entity; - + if (name.charAt(0) == '%' || "[dtd]".equals(name)) { return null; @@ -198,19 +198,19 @@ public class DomDoctype throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } getEntities(); - + DomDocument.checkName(name, (owner != null) ? "1.1".equals(owner.getXmlVersion()) : false); if (entities.getNamedItem(name) != null) { return null; } - + entity = new DomEntity(owner, name, publicId, systemId, notation); entities.setNamedItem(entity); return entity; } - + /** * <b>DOM L1</b> * Returns information about any notations declared in the DTD. @@ -219,7 +219,7 @@ public class DomDoctype * then it doesn't have the strange construction rules of L2.</em> * * @exception DOMException HIERARCHY_REQUEST_ERR if the DocumentType - * is not associated with a document. + * is not associated with a document. */ public NamedNodeMap getNotations() { @@ -239,25 +239,25 @@ public class DomDoctype * @return The notation that was declared. * * @exception DOMException NO_MODIFICATION_ALLOWED_ERR if the - * DocumentType is no longer writable. + * DocumentType is no longer writable. * @exception DOMException HIERARCHY_REQUEST_ERR if the DocumentType - * is not associated with a document. + * is not associated with a document. */ public Notation declareNotation(String name, String publicId, String systemId) { DomNotation notation; - + if (isReadonly()) { throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } getNotations(); - + DomDocument.checkName(name, (owner != null) ? "1.1".equals(owner.getXmlVersion()) : false); - + notation = new DomNotation(owner, name, publicId, systemId); notations.setNamedItem(notation); return notation; @@ -290,7 +290,7 @@ public class DomDoctype { return null; } - + /** * Sets the internal "readonly" flag so the node and its associated * data (only lists of entities and notations, no type information @@ -337,7 +337,7 @@ public class DomDoctype { return implementation.hasFeature(feature, version); } - + /** * Returns the implementation associated with this document type. */ @@ -395,7 +395,7 @@ public class DomDoctype { return ids; } - + public boolean isSameNode(Node arg) { if (equals(arg)) @@ -423,7 +423,7 @@ public class DomDoctype // TODO notations return true; } - + /** * Shallow clone of the doctype, except that associated * entities and notations are (deep) cloned. diff --git a/libjava/classpath/gnu/xml/dom/DomDocument.java b/libjava/classpath/gnu/xml/dom/DomDocument.java index b32c6b8..b1e99f4 100644 --- a/libjava/classpath/gnu/xml/dom/DomDocument.java +++ b/libjava/classpath/gnu/xml/dom/DomDocument.java @@ -1,4 +1,4 @@ -/* DomDocument.java -- +/* DomDocument.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -76,7 +76,7 @@ import org.w3c.dom.xpath.XPathNSResolver; * of basic XML conformance tests. (The huge XML character tables are * hairy to implement.) * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomDocument @@ -90,7 +90,7 @@ public class DomDocument private boolean defaultAttributes = true; boolean building; // if true, skip mutation events in the tree - + DomDocumentConfiguration config; String inputEncoding; @@ -98,7 +98,7 @@ public class DomDocument String version = "1.0"; boolean standalone; String systemId; - + /** * Constructs a Document node, associating it with an instance * of the DomImpl class. @@ -115,7 +115,7 @@ public class DomDocument { this(new DomImpl()); } - + /** * Constructs a Document node, associating it with the specified * implementation. This should only be used in conjunction with @@ -165,7 +165,7 @@ public class DomDocument { defaultAttributes = flag; } - + /** * <b>DOM L1</b> * Returns the constant "#document". @@ -236,12 +236,12 @@ public class DomDocument { doctype = null; } - + // yes, this is linear in size of document. // it'd be easy enough to maintain a hashtable. Node current = getDocumentElement(); Node temp; - + if (current == null) { return null; @@ -286,14 +286,14 @@ public class DomDocument return element; } } - + // descend? if (current.hasChildNodes()) { current = current.getFirstChild(); continue; } - + // lateral? temp = current.getNextSibling(); if (temp != null) @@ -301,8 +301,8 @@ public class DomDocument current = temp; continue; } - - // back up ... + + // back up ... do { temp = current.getParentNode(); @@ -385,13 +385,13 @@ public class DomDocument } return super.replaceChild(newChild, refChild); } - + // NOTE: DOM can't really tell when the name of an entity, // notation, or PI must follow the namespace rules (excluding // colons) instead of the XML rules (which allow them without // much restriction). That's an API issue. verifyXmlName // aims to enforce the XML rules, not the namespace rules. - + /** * Throws a DOM exception if the specified name is not a legal XML 1.0 * Name. @@ -417,7 +417,7 @@ public class DomDocument } // dog: rewritten to use the rules for XML 1.0 and 1.1 - + // Name start character char c = name.charAt(0); if (xml11) @@ -565,13 +565,13 @@ public class DomDocument char[] chars = value.toCharArray(); checkChar(chars, 0, chars.length, xml11); } - + static void checkChar(char[] buf, int off, int len, boolean xml11) { for (int i = 0; i < len; i++) { char c = buf[i]; - + // assume surrogate pairing checks out OK, for simplicity if ((c >= 0x0020 && c <= 0xd7ff) || (c == 0x000a || c == 0x000d || c == 0x0009) || @@ -603,7 +603,7 @@ public class DomDocument public Element createElement(String name) { Element element; - + if (checkingCharacters) { checkName(name, "1.1".equals(version)); @@ -633,7 +633,7 @@ public class DomDocument { checkNCName(name, "1.1".equals(version)); } - + if ("".equals(namespaceURI)) { namespaceURI = null; @@ -661,13 +661,13 @@ public class DomDocument "prefixed name '" + name + "' needs a URI", this, 0); } - + Element element = new DomElement(this, namespaceURI, name); if (defaultAttributes) setDefaultAttributes(element, name); return element; } - + private void setDefaultAttributes(Element element, String name) { DomDoctype doctype = (DomDoctype) getDoctype(); @@ -687,7 +687,7 @@ public class DomDocument if ("#IMPLIED".equals(attr.mode) && value == null) continue; DomAttr node = (DomAttr) createAttribute(attr.name); - + if (value == null) { value = ""; @@ -830,7 +830,7 @@ public class DomDocument { checkNCName(name, "1.1".equals(version)); } - + if ("".equals(namespaceURI)) { namespaceURI = null; @@ -871,7 +871,7 @@ public class DomDocument } return new DomAttr(this, namespaceURI, name); } - + /** * <b>DOM L1</b> * Returns a newly created reference to the specified entity. @@ -1006,7 +1006,7 @@ public class DomDocument { Attr a = (Attr) srcAttrs.item(i); Attr dflt; - + // maybe update defaulted attributes dflt = (Attr) dstAttrs.getNamedItem(a.getNodeName()); if (dflt != null) @@ -1019,7 +1019,7 @@ public class DomDocument } continue; } - + dstAttrs.setNamedItem((Attr) importNode(a, false)); } if (deep) @@ -1039,7 +1039,7 @@ public class DomDocument default: throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR, null, src, 0); } - + // FIXME cleanup a bit -- for deep copies, copy those // children in one place, here (code sharing is healthy) @@ -1077,7 +1077,7 @@ public class DomDocument } // DOM Level 3 methods - + /** * DOM L3 */ @@ -1090,7 +1090,7 @@ public class DomDocument { this.inputEncoding = inputEncoding; } - + /** * DOM L3 */ @@ -1098,12 +1098,12 @@ public class DomDocument { return encoding; } - + public void setXmlEncoding(String encoding) { this.encoding = encoding; } - + public boolean getXmlStandalone() { return standalone; @@ -1181,7 +1181,7 @@ public class DomDocument return systemId; */ } - + public String getDocumentURI() { return systemId; @@ -1454,7 +1454,7 @@ public class DomDocument ctx = ctxNext; } } - + public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException { @@ -1514,7 +1514,7 @@ public class DomDocument "xmlns namespace must be " + XMLConstants.XMLNS_ATTRIBUTE_NS_URI, src, 0); } - + } src.setNodeName(qualifiedName); src.setNamespaceURI(namespaceURI); @@ -1527,19 +1527,19 @@ public class DomDocument } // -- XPathEvaluator -- - + public XPathExpression createExpression(String expression, XPathNSResolver resolver) throws XPathException, DOMException { return new DomXPathExpression(this, expression, resolver); } - + public XPathNSResolver createNSResolver(Node nodeResolver) { return new DomXPathNSResolver(nodeResolver); } - + public Object evaluate(String expression, Node contextNode, XPathNSResolver resolver, @@ -1553,4 +1553,3 @@ public class DomDocument } } - diff --git a/libjava/classpath/gnu/xml/dom/DomDocumentBuilder.java b/libjava/classpath/gnu/xml/dom/DomDocumentBuilder.java index e62ce20..99c2544 100644 --- a/libjava/classpath/gnu/xml/dom/DomDocumentBuilder.java +++ b/libjava/classpath/gnu/xml/dom/DomDocumentBuilder.java @@ -1,4 +1,4 @@ -/* DomDocumentBuilder.java -- +/* DomDocumentBuilder.java -- Copyright (C) 2004,2006,2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -68,7 +68,7 @@ class DomDocumentBuilder final DOMImplementation impl; final DOMImplementationLS ls; final LSParser parser; - + DomDocumentBuilder(DOMImplementation impl, DOMImplementationLS ls, LSParser parser) @@ -83,7 +83,7 @@ class DomDocumentBuilder DOMConfiguration config = parser.getDomConfig(); return ((Boolean) config.getParameter("namespaces")).booleanValue(); } - + public boolean isValidating() { DOMConfiguration config = parser.getDomConfig(); @@ -112,7 +112,7 @@ class DomDocumentBuilder { return impl; } - + public Document newDocument() { return impl.createDocument(null, null, null); @@ -225,4 +225,3 @@ class DomDocumentBuilder } } - diff --git a/libjava/classpath/gnu/xml/dom/DomDocumentBuilderFactory.java b/libjava/classpath/gnu/xml/dom/DomDocumentBuilderFactory.java index 4d2828a..1e3eaa5 100644 --- a/libjava/classpath/gnu/xml/dom/DomDocumentBuilderFactory.java +++ b/libjava/classpath/gnu/xml/dom/DomDocumentBuilderFactory.java @@ -1,4 +1,4 @@ -/* DomDocumentBuilderFactory.java -- +/* DomDocumentBuilderFactory.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -156,7 +156,7 @@ public class DomDocumentBuilderFactory { // TODO } - + public void setFeature(String name, boolean value) throws ParserConfigurationException { @@ -177,6 +177,5 @@ public class DomDocumentBuilderFactory return secureProcessing; throw new ParserConfigurationException(name); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomDocumentConfiguration.java b/libjava/classpath/gnu/xml/dom/DomDocumentConfiguration.java index 5c589f8..9aab445 100644 --- a/libjava/classpath/gnu/xml/dom/DomDocumentConfiguration.java +++ b/libjava/classpath/gnu/xml/dom/DomDocumentConfiguration.java @@ -1,4 +1,4 @@ -/* DomDocumentConfiguration.java -- +/* DomDocumentConfiguration.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -245,12 +245,12 @@ class DomDocumentConfiguration return null; } } - + public int getLength() { return SUPPORTED_PARAMETERS.size(); } - + public boolean contains(String str) { str = str.toLowerCase(); diff --git a/libjava/classpath/gnu/xml/dom/DomDocumentFragment.java b/libjava/classpath/gnu/xml/dom/DomDocumentFragment.java index 8d26037..8c4e0db 100644 --- a/libjava/classpath/gnu/xml/dom/DomDocumentFragment.java +++ b/libjava/classpath/gnu/xml/dom/DomDocumentFragment.java @@ -1,4 +1,4 @@ -/* DomDocumentFragment.java -- +/* DomDocumentFragment.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,14 +42,14 @@ import org.w3c.dom.DocumentFragment; /** * <p> "DocumentFragment" implementation. </p> * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomDocumentFragment extends DomNode implements DocumentFragment { - + /** * Constructs a DocumentFragment node associated with the * specified document. @@ -71,6 +71,5 @@ public class DomDocumentFragment { return "#document-fragment"; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomElement.java b/libjava/classpath/gnu/xml/dom/DomElement.java index 462cb91..4297499 100644 --- a/libjava/classpath/gnu/xml/dom/DomElement.java +++ b/libjava/classpath/gnu/xml/dom/DomElement.java @@ -1,4 +1,4 @@ -/* DomElement.java -- +/* DomElement.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -51,7 +51,7 @@ import org.w3c.dom.TypeInfo; /** * <p> "Element" implementation. * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomElement @@ -81,7 +81,7 @@ public class DomElement * * @param owner The document with which this node is associated * @param namespaceURI Combined with the local part of the name, - * this is used to uniquely identify a type of element + * this is used to uniquely identify a type of element * @param name Name of this element, which may include a prefix */ protected DomElement(DomDocument owner, String namespaceURI, String name) @@ -99,18 +99,18 @@ public class DomElement * <p> * With this constructor, the prefix and local part are given explicitly * rather than being computed. This allows them to be explicitly set to - * {@code null} as required by {@link Document#createElement(String)}. + * {@code null} as required by {@link Document#createElement(String)}. * </p> * * @param owner The document with which this node is associated * @param namespaceURI Combined with the local part of the name, - * this is used to uniquely identify a type of element + * this is used to uniquely identify a type of element * @param name Name of this element, which may include a prefix * @param prefix the namespace prefix of the name. May be {@code null}. * @param localName the local part of the name. May be {@code null}. */ protected DomElement(DomDocument owner, String namespaceURI, String name, - String prefix, String localName) + String prefix, String localName) { super(ELEMENT_NODE, owner, namespaceURI, name, prefix, localName); } @@ -263,7 +263,7 @@ public class DomElement * <b>DOM L1</b> * Modifies an existing attribute to have the specified value, * or creates a new one with that value. The name used is the - * nodeName value. + * nodeName value. */ public void setAttribute(String name, String value) { @@ -476,7 +476,7 @@ public class DomElement } return super.lookupNamespaceURI(prefix); } - + public String getBaseURI() { if (attributes != null) @@ -490,7 +490,7 @@ public class DomElement } return super.getBaseURI(); } - + public TypeInfo getSchemaTypeInfo() { // DTD implementation @@ -509,7 +509,7 @@ public class DomElement Attr attr = (Attr) attrs.getNamedItem(name); setIdAttributeNode(attr, isId); } - + public void setIdAttributeNode(Attr attr, boolean isId) { if (readonly) @@ -578,5 +578,5 @@ public class DomElement } return true; } - + } diff --git a/libjava/classpath/gnu/xml/dom/DomEntity.java b/libjava/classpath/gnu/xml/dom/DomEntity.java index 3a76479..be44d73 100644 --- a/libjava/classpath/gnu/xml/dom/DomEntity.java +++ b/libjava/classpath/gnu/xml/dom/DomEntity.java @@ -1,4 +1,4 @@ -/* DomEntity.java -- +/* DomEntity.java -- Copyright (C) 1999,2000,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,17 +45,17 @@ import org.w3c.dom.Entity; * particularly well in this API:</p><dl> * * <dt><em>Unparsed Entities</em></dt> - * <dd>Since ENTITY/ENTITIES attributes, the only legal use of unparsed - * entities in XML, can't be detected with DOM, there isn't much point in - * trying to use unparsed entities in DOM applications. (XML Linking is - * working to provide a better version of this functionality.) </dd> + * <dd>Since ENTITY/ENTITIES attributes, the only legal use of unparsed + * entities in XML, can't be detected with DOM, there isn't much point in + * trying to use unparsed entities in DOM applications. (XML Linking is + * working to provide a better version of this functionality.) </dd> * * <dt><em>Parsed Entities</em></dt> - * <dd> While the DOM specification permits nodes for parsed entities - * to have a readonly set of children, this is not required and there - * is no portable way to provide such children. <em>This implementation - * currently does not permit children to be added to Entities.</em> - * There are related issues with the use of EntityReference nodes. </dd> + * <dd> While the DOM specification permits nodes for parsed entities + * to have a readonly set of children, this is not required and there + * is no portable way to provide such children. <em>This implementation + * currently does not permit children to be added to Entities.</em> + * There are related issues with the use of EntityReference nodes. </dd> * * </dl> * @@ -65,14 +65,14 @@ import org.w3c.dom.Entity; * @see DomEntityReference * @see DomNotation * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomEntity extends DomExtern implements Entity { - + private String notation; /** @@ -113,13 +113,13 @@ public class DomEntity } // DOM Level 3 methods - + public String getInputEncoding() { // TODO - return null; + return null; } - + public String getXmlEncoding() { // TODO @@ -142,6 +142,5 @@ public class DomEntity String systemId = getSystemId(); return (systemId == null) ? owner.getBaseURI() : systemId; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomEntityReference.java b/libjava/classpath/gnu/xml/dom/DomEntityReference.java index d4596b4..1fa2ea6 100644 --- a/libjava/classpath/gnu/xml/dom/DomEntityReference.java +++ b/libjava/classpath/gnu/xml/dom/DomEntityReference.java @@ -1,4 +1,4 @@ -/* DomEntityReference.java -- +/* DomEntityReference.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -71,7 +71,7 @@ import org.w3c.dom.EntityReference; * @see DomDoctype * @see DomEntity * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomEntityReference @@ -80,7 +80,7 @@ public class DomEntityReference { private String name; - + /** * Constructs an EntityReference node associated with the specified * document. The creator should populate this with whatever contents @@ -97,7 +97,7 @@ public class DomEntityReference super(ENTITY_REFERENCE_NODE, owner); this.name = name; } - + /** * Returns the name of the referenced entity. * @since DOM Level 1 Core diff --git a/libjava/classpath/gnu/xml/dom/DomEvent.java b/libjava/classpath/gnu/xml/dom/DomEvent.java index 9190ed8..3e9a655 100644 --- a/libjava/classpath/gnu/xml/dom/DomEvent.java +++ b/libjava/classpath/gnu/xml/dom/DomEvent.java @@ -1,4 +1,4 @@ -/* DomEvent.java -- +/* DomEvent.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -46,7 +46,7 @@ import org.w3c.dom.events.EventTarget; import org.w3c.dom.events.MutationEvent; import org.w3c.dom.events.UIEvent; -import org.w3c.dom.views.AbstractView; // used by UIEvent +import org.w3c.dom.views.AbstractView; // used by UIEvent /** * "Event" implementation. Events are @@ -62,7 +62,7 @@ import org.w3c.dom.views.AbstractView; // used by UIEvent public class DomEvent implements Event { - + String type; // init EventTarget target; EventTarget currentNode; @@ -130,10 +130,10 @@ public class DomEvent { return timeStamp; } - + boolean stop; boolean doDefault; - + /** * Requests the event no longer be captured or bubbled; only * listeners on the event target will see the event, if they @@ -174,7 +174,7 @@ public class DomEvent cancelable = cancelableArg; timeStamp = System.currentTimeMillis(); } - + /** Constructs, but does not initialize, an event. */ public DomEvent(String type) { @@ -216,7 +216,7 @@ public class DomEvent buf.append("]"); return buf.toString(); } - + /** * "MutationEvent" implementation. */ @@ -224,46 +224,46 @@ public class DomEvent extends DomEvent implements MutationEvent { - + // package private Node relatedNode; // init - + private String prevValue; // init private String newValue; // init - + private String attrName; // init private short attrChange; // init - + /** Returns any "related" node provided by this type of event */ public final Node getRelatedNode() { return relatedNode; } - + /** Returns any "previous value" provided by this type of event */ public final String getPrevValue() { return prevValue; } - + /** Returns any "new value" provided by this type of event */ public final String getNewValue() { return newValue; } - + /** For attribute change events, returns the attribute's name */ public final String getAttrName() { return attrName; } - + /** For attribute change events, returns how the attribuet changed */ public final short getAttrChange() { return attrChange; } - + /** Initializes a mutation event */ public final void initMutationEvent(String typeArg, boolean canBubbleArg, @@ -281,7 +281,7 @@ public class DomEvent bubbles = canBubbleArg; cancelable = cancelableArg; timeStamp = System.currentTimeMillis(); - + relatedNode = relatedNodeArg; prevValue = prevValueArg; newValue = newValueArg; @@ -304,7 +304,7 @@ public class DomEvent { super(type); } - + } /** @@ -314,16 +314,16 @@ public class DomEvent extends DomEvent implements UIEvent { - + private AbstractView view; // init private int detail; // init - + /** Constructs an uninitialized User Interface (UI) event */ public DomUIEvent (String type) { super (type); } - + public final AbstractView getView () { return view; } public final int getDetail () { return detail; } - + /** Initializes a UI event */ public final void initUIEvent(String typeArg, boolean canBubbleArg, @@ -335,7 +335,7 @@ public class DomEvent view = viewArg; detail = detailArg; } - + } /* @@ -349,4 +349,3 @@ public class DomEvent */ } - diff --git a/libjava/classpath/gnu/xml/dom/DomExtern.java b/libjava/classpath/gnu/xml/dom/DomExtern.java index 87a6909..7f2e55a 100644 --- a/libjava/classpath/gnu/xml/dom/DomExtern.java +++ b/libjava/classpath/gnu/xml/dom/DomExtern.java @@ -1,4 +1,4 @@ -/* DomExtern.java -- +/* DomExtern.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,17 +48,17 @@ package gnu.xml.dom; * of them is defined fully enough to permit full use of the * XML feature they partially expose. </p> * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public abstract class DomExtern extends DomNode { - + private final String name; private final String publicId; private final String systemId; - + /** * Constructs a node associated with the specified document, * with the specified descriptive data. @@ -98,7 +98,7 @@ public abstract class DomExtern { return publicId; } - + /** * <b>DOM L1</b> * Returns the object's name. @@ -112,6 +112,5 @@ public abstract class DomExtern { return name; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomImpl.java b/libjava/classpath/gnu/xml/dom/DomImpl.java index cabe741..76a63ca 100644 --- a/libjava/classpath/gnu/xml/dom/DomImpl.java +++ b/libjava/classpath/gnu/xml/dom/DomImpl.java @@ -1,4 +1,4 @@ -/* DomImpl.java -- +/* DomImpl.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,13 +64,13 @@ import gnu.xml.dom.ls.DomLSSerializer; * It is possible to compile the package so it doesn't support some of these * features (notably, Traversal). * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomImpl implements DOMImplementation, DOMImplementationLS { - + /** * Constructs a DOMImplementation object which supports * "XML" and other DOM Level 2 features. @@ -95,7 +95,7 @@ public class DomImpl { name = name.substring(1); } - + if ("xml".equals(name) || "core".equals(name)) { return (version == null || @@ -103,7 +103,7 @@ public class DomImpl "1.0".equals(version) || "2.0".equals(version) || "3.0".equals(version)); - + } else if ("ls".equals(name) || "ls-async".equals(name)) { @@ -120,7 +120,7 @@ public class DomImpl return (version == null || "".equals(version) || "2.0".equals(version)); - + // Extension: "USER-" prefix event types can // be created and passed through the DOM. @@ -131,11 +131,11 @@ public class DomImpl "".equals(version) || "0.1".equals(version)); - // NOTE: "hasFeature" for events is here interpreted to - // mean the DOM can manufacture those sorts of events, - // since actually choosing to report the events is more - // often part of the environment or application. It's - // only really an issue for mutation events. + // NOTE: "hasFeature" for events is here interpreted to + // mean the DOM can manufacture those sorts of events, + // since actually choosing to report the events is more + // often part of the environment or application. It's + // only really an issue for mutation events. } else if (DomNode.reportMutations @@ -143,7 +143,7 @@ public class DomImpl { return (version == null || "".equals(version) || - "2.0".equals(version)); + "2.0".equals(version)); } else if ("xpath".equals(name)) { @@ -162,7 +162,7 @@ public class DomImpl // stylesheets // css, css2 // range - + return false; } @@ -208,7 +208,7 @@ public class DomImpl { Document doc = createDocument(); Element root = null; - + if (rootName != null) { root = doc.createElementNS(namespaceURI, rootName); @@ -221,7 +221,7 @@ public class DomImpl // Bleech -- L2 seemingly _requires_ omission of xmlns attributes. if (doctype != null) { - doc.appendChild(doctype); // handles WRONG_DOCUMENT error + doc.appendChild(doctype); // handles WRONG_DOCUMENT error } if (root != null) { @@ -236,7 +236,7 @@ public class DomImpl } // DOM Level 3 - + public Object getFeature(String feature, String version) { if (hasFeature(feature, version)) @@ -273,6 +273,5 @@ public class DomImpl { return new DomLSOutput(); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomIterator.java b/libjava/classpath/gnu/xml/dom/DomIterator.java index 31f9982..d5f305c 100644 --- a/libjava/classpath/gnu/xml/dom/DomIterator.java +++ b/libjava/classpath/gnu/xml/dom/DomIterator.java @@ -1,4 +1,4 @@ -/* DomIterator.java -- +/* DomIterator.java -- Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,21 +50,21 @@ import org.w3c.dom.traversal.NodeIterator; * <p> "NodeIterator" implementation, usable with any L2 DOM which * supports MutationEvents. </p> * - * @author David Brownell + * @author David Brownell */ public final class DomIterator implements NodeIterator, EventListener { - + private Node reference; private boolean right; private boolean done; - + private final Node root; private final int whatToShow; private final NodeFilter filter; private final boolean expandEntityReferences; - + /** * Constructs and initializes an iterator. */ @@ -73,22 +73,22 @@ public final class DomIterator NodeFilter filter, boolean entityReferenceExpansion) { - if (!root.isSupported("MutationEvents", "2.0")) + if (!root.isSupported("MutationEvents", "2.0")) { throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR, "Iterator needs mutation events", root, 0); } - + this.root = root; this.whatToShow = whatToShow; this.filter = filter; this.expandEntityReferences = entityReferenceExpansion; - + // start condition: going right, seen nothing yet. reference = null; right = true; - - EventTarget target = (EventTarget) root; + + EventTarget target = (EventTarget) root; target.addEventListener("DOMNodeRemoved", this, false); } @@ -100,7 +100,7 @@ public final class DomIterator */ public void detach() { - EventTarget target = (EventTarget) root; + EventTarget target = (EventTarget) root; target.removeEventListener("DOMNodeRemoved", this, false); done = true; } @@ -114,7 +114,7 @@ public final class DomIterator { return expandEntityReferences; } - + /** * <b>DOM L2</b> * Returns the filter provided during construction. @@ -123,7 +123,7 @@ public final class DomIterator { return filter; } - + /** * <b>DOM L2</b> * Returns the root of the tree this is iterating through. @@ -132,7 +132,7 @@ public final class DomIterator { return root; } - + /** * <b>DOM L2</b> * Returns the mask of flags provided during construction. @@ -141,7 +141,7 @@ public final class DomIterator { return whatToShow; } - + /** * <b>DOM L2</b> * Returns the next node in a forward iteration, masked and filtered. @@ -228,7 +228,7 @@ public final class DomIterator } return leaf; } - + // // Returns the immediate successor in a forward (or backward) // document order walk, sans filtering ... except that it knows @@ -253,13 +253,13 @@ public final class DomIterator { return here.getFirstChild(); } - + // There's no way up or sideways from the root, so if we // couldn't move down to a child, there's nowhere to go. // if (here == root) return null; - + // // Siblings ... if forward, we visit them, if backwards // we visit their children first. @@ -284,7 +284,7 @@ public final class DomIterator } return next; } - + // // We can't go down or lateral -- it's up, then. The logic is // the converse of what's above: backwards is easy (the parent @@ -295,7 +295,7 @@ public final class DomIterator { return next; } - + Node temp = null; while (next != null && next != root @@ -303,7 +303,7 @@ public final class DomIterator { next = next.getParentNode(); } - + // If we have exceeded the root node then stop traversing. if (next == root.getParentNode()) { @@ -324,7 +324,7 @@ public final class DomIterator { MutationEvent event; Node ancestor, removed; - + if (reference == null || !"DOMNodeRemoved".equals(e.getType()) || e.getEventPhase() != Event.BUBBLING_PHASE) @@ -372,10 +372,9 @@ search: } return; } - + // The current DOM WD talks about a special case here; // I've not yet seen it. } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomNSResolverContext.java b/libjava/classpath/gnu/xml/dom/DomNSResolverContext.java index 4cf5777..3dd9575 100644 --- a/libjava/classpath/gnu/xml/dom/DomNSResolverContext.java +++ b/libjava/classpath/gnu/xml/dom/DomNSResolverContext.java @@ -1,4 +1,4 @@ -/* DomNSResolverContext.java -- +/* DomNSResolverContext.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,41 +50,41 @@ class DomNSResolverContext implements NamespaceContext, Iterator { - final XPathNSResolver resolver; - - DomNSResolverContext(XPathNSResolver resolver) - { - this.resolver = resolver; - } - - public String getNamespaceURI(String prefix) - { - return resolver.lookupNamespaceURI(prefix); - } - - public String getPrefix(String namespaceURI) - { - return null; - } - - public Iterator getPrefixes(String namespaceURI) - { - return this; - } - - public boolean hasNext() - { - return false; - } - - public Object next() - { - return null; - } - - public void remove() - { - throw new UnsupportedOperationException(); - } + final XPathNSResolver resolver; + + DomNSResolverContext(XPathNSResolver resolver) + { + this.resolver = resolver; + } + + public String getNamespaceURI(String prefix) + { + return resolver.lookupNamespaceURI(prefix); + } + + public String getPrefix(String namespaceURI) + { + return null; + } + + public Iterator getPrefixes(String namespaceURI) + { + return this; + } + + public boolean hasNext() + { + return false; + } + + public Object next() + { + return null; + } + + public void remove() + { + throw new UnsupportedOperationException(); + } } diff --git a/libjava/classpath/gnu/xml/dom/DomNamedNodeMap.java b/libjava/classpath/gnu/xml/dom/DomNamedNodeMap.java index e37cc3d..7a76735 100644 --- a/libjava/classpath/gnu/xml/dom/DomNamedNodeMap.java +++ b/libjava/classpath/gnu/xml/dom/DomNamedNodeMap.java @@ -1,4 +1,4 @@ -/* DomNamedNodeMap.java -- +/* DomNamedNodeMap.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -46,7 +46,7 @@ import org.w3c.dom.Node; * Used mostly to hold element attributes, but sometimes also * to list notations or entities. * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomNamedNodeMap @@ -55,11 +55,11 @@ public class DomNamedNodeMap final DomNode owner; final short type; - + DomNode first; int length; boolean readonly; - + // package private DomNamedNodeMap(DomNode owner, short type) { @@ -76,8 +76,8 @@ public class DomNamedNodeMap public final boolean isReadonly() { return readonly; - } - + } + /** * Sets the internal "readonly" flag so the node and its * children can't be changed. @@ -90,7 +90,7 @@ public class DomNamedNodeMap ctx.makeReadonly(); } } - + /** * <b>DOM L1</b> * Returns the named item from the map, or null; names are just @@ -189,7 +189,7 @@ public class DomNamedNodeMap node.parent = owner; node.depth = owner.depth + 1; } - + String nodeName = node.getNodeName(); String localName = ns ? node.getLocalName() : null; String namespaceURI = ns ? node.getNamespaceURI() : null; @@ -197,7 +197,7 @@ public class DomNamedNodeMap { namespaceURI = null; } - + // maybe attribute ADDITION events (?) DomNode last = null; for (DomNode ctx = first; ctx != null; ctx = ctx.next) @@ -373,10 +373,10 @@ public class DomNamedNodeMap ctx.index = 0; return ctx; } - } + } throw new DomDOMException(DOMException.NOT_FOUND_ERR); } - + String getDefaultValue(String name) { DomDoctype doctype = (DomDoctype) owner.owner.getDoctype(); @@ -417,5 +417,5 @@ public class DomNamedNodeMap { return length; } - + } diff --git a/libjava/classpath/gnu/xml/dom/DomNode.java b/libjava/classpath/gnu/xml/dom/DomNode.java index 78e1ab8..879baaa 100644 --- a/libjava/classpath/gnu/xml/dom/DomNode.java +++ b/libjava/classpath/gnu/xml/dom/DomNode.java @@ -1,4 +1,4 @@ -/* DomNode.java -- +/* DomNode.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -102,10 +102,10 @@ public abstract class DomNode //final static String xmlnsURI = "http://www.w3.org/2000/xmlns/"; // tunable - // NKIDS_* affects arrays of children (which grow) + // NKIDS_* affects arrays of children (which grow) // (currently) fixed size: - // ANCESTORS_* is for event capture/bubbling, # ancestors - // NOTIFICATIONS_* is for per-node event delivery, # events + // ANCESTORS_* is for event capture/bubbling, # ancestors + // NOTIFICATIONS_* is for per-node event delivery, # events private static final int NKIDS_DELTA = 8; private static final int ANCESTORS_INIT = 20; private static final int NOTIFICATIONS_INIT = 10; @@ -193,7 +193,7 @@ public abstract class DomNode this.owner = owner; this.listeners = new HashSet(); } - + /** * <b>DOM L1</b> @@ -314,7 +314,7 @@ public abstract class DomNode this.owner; DomDocument childOwner = child.owner; short childNodeType = child.nodeType; - + if (childOwner != owner) { // new in DOM L2, this case -- patch it up later, in reparent() @@ -338,7 +338,7 @@ public abstract class DomNode return; } break; - + case ATTRIBUTE_NODE: switch (childNodeType) { @@ -347,7 +347,7 @@ public abstract class DomNode return; } break; - + case DOCUMENT_FRAGMENT_NODE: case ENTITY_REFERENCE_NODE: case ELEMENT_NODE: @@ -384,7 +384,7 @@ public abstract class DomNode this, 0); } } - + // Here's hoping a good optimizer will detect the case when the // next several methods are never called, and won't allocate // object code space of any kind. (Case: not reporting any @@ -399,7 +399,7 @@ public abstract class DomNode return; } boolean doFree = false; - + if (event == null) { event = getMutationEvent(); @@ -531,7 +531,7 @@ public abstract class DomNode { try { - DomNode child = (DomNode) newChild; + DomNode child = (DomNode) newChild; if (child.nodeType == DOCUMENT_FRAGMENT_NODE) { @@ -610,9 +610,9 @@ public abstract class DomNode try { - DomNode child = (DomNode) newChild; + DomNode child = (DomNode) newChild; DomNode ref = (DomNode) refChild; - + if (child.nodeType == DOCUMENT_FRAGMENT_NODE) { // Append all nodes in the fragment to this node @@ -641,7 +641,7 @@ public abstract class DomNode "can't insert node before itself", ref, 0); } - + if (child.parent != null) { child.parent.removeChild(child); @@ -672,7 +672,7 @@ public abstract class DomNode } length++; } - + return child; } catch (ClassCastException e) @@ -713,10 +713,10 @@ public abstract class DomNode { DomNode child = (DomNode) newChild; DomNode ref = (DomNode) refChild; - + DomEvent.DomMutationEvent event = getMutationEvent(); boolean doFree = (event != null); - + if (child.nodeType == DOCUMENT_FRAGMENT_NODE) { // Append all nodes in the fragment to this node @@ -729,14 +729,14 @@ public abstract class DomNode throw new DomDOMException(DOMException.NOT_FOUND_ERR, null, ref, 0); } - + if (reportMutations) { removalEvent(event, ref); } length--; length += child.length; - + if (child.length == 0) { // Removal @@ -793,12 +793,12 @@ public abstract class DomNode throw new DomDOMException(DOMException.NOT_FOUND_ERR, null, ref, 0); } - + if (reportMutations) { removalEvent(event, ref); } - + if (child.parent != null) { child.parent.removeChild(child); @@ -839,7 +839,7 @@ public abstract class DomNode ref.setDepth(0); ref.previous = null; ref.next = null; - + return ref; } catch (ClassCastException e) @@ -875,7 +875,7 @@ public abstract class DomNode throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, null, this, 0); } - + for (DomNode child = first; child != null; child = child.next) { if (child == ref) @@ -913,7 +913,7 @@ public abstract class DomNode ref.index = 0; ref.previous = null; ref.next = null; - + return ref; } } @@ -1002,9 +1002,9 @@ public abstract class DomNode */ public boolean isSupported(String feature, String version) { - Document doc = owner; - DOMImplementation impl = null; - + Document doc = owner; + DOMImplementation impl = null; + if (doc == null && nodeType == DOCUMENT_NODE) { doc = (Document) this; @@ -1183,7 +1183,7 @@ public abstract class DomNode try { DomNode node = (DomNode) super.clone(); - + node.parent = null; node.depth = 0; node.index = 0; @@ -1192,7 +1192,7 @@ public abstract class DomNode node.last = null; node.previous = null; node.next = null; - + node.readonly = false; node.listeners = new HashSet(); node.nListeners = 0; @@ -1242,7 +1242,7 @@ public abstract class DomNode { private LiveNodeList liveList; - + ShadowList(String ns, String local) { liveList = new LiveNodeList(ns, local); @@ -1268,15 +1268,15 @@ public abstract class DomNode final class LiveNodeList implements NodeList, EventListener, NodeFilter { - + private final boolean matchAnyURI; - private final boolean matchAnyName; + private final boolean matchAnyName; private final String elementURI; private final String elementName; - + private DomIterator current; private int lastIndex; - + LiveNodeList(String uri, String name) { elementURI = uri; @@ -1336,28 +1336,28 @@ public abstract class DomNode { return new DomIterator(DomNode.this, NodeFilter.SHOW_ELEMENT, - this, /* filter */ - true /* expand entity refs */ + this, /* filter */ + true /* expand entity refs */ ); } public void handleEvent(Event e) { - MutationEvent mutation = (MutationEvent) e; - Node related = mutation.getRelatedNode(); - + MutationEvent mutation = (MutationEvent) e; + Node related = mutation.getRelatedNode(); + // XXX if it's got children ... check all kids too, they // will invalidate our saved index - + if (related.getNodeType() != Node.ELEMENT_NODE || related.getNodeName() != elementName || related.getNamespaceURI() != elementURI) { return; } - + if (current != null) - current.detach(); + current.detach(); current = null; } @@ -1368,7 +1368,7 @@ public abstract class DomNode current = createIterator(); lastIndex = -1; } - + // last node or before? go backwards if (index <= lastIndex) { while (index != lastIndex) { @@ -1376,11 +1376,11 @@ public abstract class DomNode lastIndex--; } Node ret = current.previousNode (); - current.detach(); + current.detach(); current = null; return ret; - } - + } + // somewhere after last node while (++lastIndex != index) current.nextNode (); @@ -1390,12 +1390,12 @@ public abstract class DomNode current = null; return ret; } - + public int getLength() { int retval = 0; NodeIterator iter = createIterator(); - + while (iter.nextNode() != null) { retval++; @@ -1403,7 +1403,7 @@ public abstract class DomNode iter.detach(); return retval; } - + } // @@ -1411,7 +1411,7 @@ public abstract class DomNode // static final class ListenerRecord { - + String type; EventListener listener; boolean useCapture; @@ -1435,10 +1435,10 @@ public abstract class DomNode && useCapture == rec.useCapture && type == rec.type; } - + public int hashCode() { - return listener.hashCode() ^ type.hashCode(); + return listener.hashCode() ^ type.hashCode(); } } @@ -1456,32 +1456,32 @@ public abstract class DomNode * of DomEvent and pass that to dispatchEvent(). * * @param eventType Identifies the particular DOM feature module - * defining the type of event, such as "MutationEvents". - * <em>The event "name" is a different kind of "type".</em> + * defining the type of event, such as "MutationEvents". + * <em>The event "name" is a different kind of "type".</em> */ public Event createEvent(String eventType) { eventType = eventType.toLowerCase(); - + if ("mutationevents".equals(eventType)) { return new DomEvent.DomMutationEvent(null); } - + if ("htmlevents".equals(eventType) || "events".equals(eventType) || "user-events".equals(eventType)) { return new DomEvent(null); } - + if ("uievents".equals(eventType)) { return new DomEvent.DomUIEvent(null); } - // mouse events - + // mouse events + throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR, eventType, null, 0); } @@ -1508,12 +1508,12 @@ public abstract class DomNode static final class DomEventException extends EventException { - + DomEventException() { super(UNSPECIFIED_EVENT_TYPE_ERR, "unspecified event type"); } - + } /** @@ -1527,7 +1527,7 @@ public abstract class DomNode * * @exception NullPointerException When a null event is passed. * @exception ClassCastException When the event wasn't provided by - * the createEvent method, or otherwise isn't a DomEvent. + * the createEvent method, or otherwise isn't a DomEvent. * @exception EventException If the event type wasn't specified */ public final boolean dispatchEvent(Event event) @@ -1537,7 +1537,7 @@ public abstract class DomNode DomNode[] ancestors = null; int ancestorMax = 0; boolean haveDispatchDataLock = false; - + if (e.type == null) { throw new DomEventException(); @@ -1545,7 +1545,7 @@ public abstract class DomNode e.doDefault = true; e.target = this; - + // // Typical case: one nonrecursive dispatchEvent call at a time // for this class. If that's our case, we can avoid allocating @@ -1565,7 +1565,7 @@ public abstract class DomNode boolean haveAncestorRegistrations = false; ListenerRecord[] notificationSet; int ancestorLen; - + synchronized (lockNode) { if (!dispatchDataLock) @@ -1581,7 +1581,7 @@ public abstract class DomNode } ancestorLen = ancestors.length; } - + // Climb to the top of this subtree and handle capture, letting // each node (from the top down) capture until one stops it or // until we get to this one. @@ -1597,7 +1597,7 @@ public abstract class DomNode { if (current == null || current.depth == 0) break; - + if (current.nListeners != 0) { haveAncestorRegistrations = true; @@ -1609,10 +1609,10 @@ public abstract class DomNode { throw new RuntimeException("dispatchEvent capture stack size"); } - + ancestorMax = index; e.stop = false; - + if (haveAncestorRegistrations) { e.eventPhase = Event.CAPTURING_PHASE; @@ -1625,7 +1625,7 @@ public abstract class DomNode } } } - + // Always deliver events to the target node (this) // unless stopPropagation was called. If we saw // no registrations yet (typical!), we never will. @@ -1638,11 +1638,11 @@ public abstract class DomNode { e.stop = true; } - + // If the event bubbles and propagation wasn't halted, // walk back up the ancestor list. Stop bubbling when // any bubbled event handler stops it. - + if (!e.stop && e.bubbles) { e.eventPhase = Event.BUBBLING_PHASE; @@ -1659,11 +1659,11 @@ public abstract class DomNode } } e.eventPhase = 0; - + // Caller chooses whether to perform the default // action based on return from this method. return e.doDefault; - + } finally { @@ -1678,13 +1678,13 @@ public abstract class DomNode ancestors [i] = null; } // notificationSet handled by notifyNode - + dispatchDataLock = false; } } } } - + private void notifyNode(DomEvent e, DomNode current, boolean capture, @@ -1704,7 +1704,7 @@ public abstract class DomNode { continue; } - if (!e.type.equals (rec.type)) + if (!e.type.equals (rec.type)) { continue; } @@ -1722,18 +1722,18 @@ public abstract class DomNode iter = null; // Notify just those listeners - e.currentNode = current; + e.currentNode = current; for (int i = 0; i < count; i++) { try { - iter = current.listeners.iterator(); + iter = current.listeners.iterator(); // Late in the DOM CR process (3rd or 4th CR?) the // removeEventListener spec became asymmetric with respect // to addEventListener ... effect is now immediate. - while (iter.hasNext()) + while (iter.hasNext()) { - ListenerRecord rec = (ListenerRecord)iter.next(); + ListenerRecord rec = (ListenerRecord)iter.next(); if (rec.equals(notificationSet[i])) { @@ -1747,7 +1747,7 @@ public abstract class DomNode { // ignore all exceptions } - notificationSet[i] = null; // free for GC + notificationSet[i] = null; // free for GC } } @@ -2074,7 +2074,7 @@ public abstract class DomNode } if (ctx != null || argCtx != null) return false; - + // TODO DocumentType return true; } @@ -2082,9 +2082,9 @@ public abstract class DomNode boolean equal(String arg1, String arg2) { return ((arg1 == null && arg2 == null) || - (arg1 != null && arg1.equals(arg2))); + (arg1 != null && arg1.equals(arg2))); } - + public Object getFeature(String feature, String version) { DOMImplementation impl = (nodeType == DOCUMENT_NODE) ? @@ -2145,7 +2145,7 @@ public abstract class DomNode buf.append(']'); return buf.toString(); } - + String encode(String value) { CPStringBuilder buf = null; @@ -2220,4 +2220,3 @@ public abstract class DomNode } } - diff --git a/libjava/classpath/gnu/xml/dom/DomNodeIterator.java b/libjava/classpath/gnu/xml/dom/DomNodeIterator.java index 8001556..9f9ec7e 100644 --- a/libjava/classpath/gnu/xml/dom/DomNodeIterator.java +++ b/libjava/classpath/gnu/xml/dom/DomNodeIterator.java @@ -1,4 +1,4 @@ -/* DomNodeIterator.java -- +/* DomNodeIterator.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -140,7 +140,7 @@ public class DomNodeIterator current = (ret == null) ? current : ret; } while (!accept(ret)); - + return ret; } diff --git a/libjava/classpath/gnu/xml/dom/DomNotation.java b/libjava/classpath/gnu/xml/dom/DomNotation.java index 26e7872..abb0e9d 100644 --- a/libjava/classpath/gnu/xml/dom/DomNotation.java +++ b/libjava/classpath/gnu/xml/dom/DomNotation.java @@ -1,4 +1,4 @@ -/* DomNotation.java -- +/* DomNotation.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -56,14 +56,14 @@ import org.w3c.dom.Notation; * @see DomEntity * @see DomPI * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomNotation extends DomExtern implements Notation { - + /** * Constructs a Notation node associated with the specified document, * with the specified descriptive data. Note that at least one of @@ -72,7 +72,7 @@ public class DomNotation * * <p>This constructor should only be invoked by a DomDoctype object * as part of its declareNotation functionality, or through a subclass - * which is similarly used in a "Sub-DOM" style layer. + * which is similarly used in a "Sub-DOM" style layer. * * @param owner The document with which this notation is associated * @param name Name of this notation @@ -87,7 +87,7 @@ public class DomNotation super(NOTATION_NODE, owner, name, publicId, systemId); makeReadonly(); } - + /** * The base URI of an external entity is its system ID. * The base URI of an internal entity is the parent document's base URI. @@ -98,6 +98,5 @@ public class DomNotation String systemId = getSystemId(); return (systemId == null) ? owner.getBaseURI() : systemId; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomNsNode.java b/libjava/classpath/gnu/xml/dom/DomNsNode.java index d336151..55e3511 100644 --- a/libjava/classpath/gnu/xml/dom/DomNsNode.java +++ b/libjava/classpath/gnu/xml/dom/DomNsNode.java @@ -1,4 +1,4 @@ -/* DomNsNode.java -- +/* DomNsNode.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -44,25 +44,25 @@ import org.w3c.dom.DOMException; * <p> Abstract implemention of namespace support. This facilitates * sharing code for attribute and element nodes. * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public abstract class DomNsNode extends DomNode { - + private String name; private String namespace; private String prefix; private String localName; - + /** * Constructs a node associated with the specified document, and * with the specified namespace information. * * @param owner The document with which this entity is associated * @param namespaceURI Combined with the local part of the name, - * this identifies a type of element or attribute; may be null. + * this identifies a type of element or attribute; may be null. * If this is the empty string, it is reassigned as null so that * applications only need to test that case. * @param name Name of this node, which may include a prefix @@ -84,7 +84,7 @@ public abstract class DomNsNode * * @param owner The document with which this entity is associated * @param namespaceURI Combined with the local part of the name, - * this identifies a type of element or attribute; may be null. + * this identifies a type of element or attribute; may be null. * If this is the empty string, it is reassigned as null so that * applications only need to test that case. * @param name Name of this node, which may include a prefix @@ -93,7 +93,7 @@ public abstract class DomNsNode */ // package private DomNsNode(short nodeType, DomDocument owner, String namespaceURI, String name, - String prefix, String localName) + String prefix, String localName) { super(nodeType, owner); this.name = name.intern(); @@ -126,7 +126,7 @@ public abstract class DomNsNode localName = name.substring(index + 1).intern(); } } - + /** * <b>DOM L2</b> * Returns the node's namespace URI @@ -145,7 +145,7 @@ public abstract class DomNsNode } namespace = (namespaceURI == null) ? null : namespaceURI.intern(); } - + /** * <b>DOM L2</b> * Returns any prefix part of the node's name (before any colon). @@ -222,6 +222,5 @@ public abstract class DomNsNode { return localName; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomProcessingInstruction.java b/libjava/classpath/gnu/xml/dom/DomProcessingInstruction.java index 2c90967..6d443a2 100644 --- a/libjava/classpath/gnu/xml/dom/DomProcessingInstruction.java +++ b/libjava/classpath/gnu/xml/dom/DomProcessingInstruction.java @@ -1,4 +1,4 @@ -/* DomProcessingInstruction.java -- +/* DomProcessingInstruction.java -- Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -55,24 +55,24 @@ import org.w3c.dom.ProcessingInstruction; * * @see DomNotation * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomProcessingInstruction extends DomNode implements ProcessingInstruction { - + private String target; private String data; - + /** * Constructs a ProcessingInstruction node associated with the * specified document, with the specified data. * * <p>This constructor should only be invoked by a Document object as * part of its createProcessingInstruction functionality, or through - * a subclass which is similarly used in a "Sub-DOM" style layer. + * a subclass which is similarly used in a "Sub-DOM" style layer. */ protected DomProcessingInstruction(DomDocument owner, String target, String data) @@ -129,7 +129,7 @@ public class DomProcessingInstruction { setNodeValue(data); } - + /** * <b>DOM L1</b> * Assigns the data associated with the processing instruction. @@ -142,6 +142,5 @@ public class DomProcessingInstruction } this.data = data; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/DomText.java b/libjava/classpath/gnu/xml/dom/DomText.java index 167eba3..b74c5b4 100644 --- a/libjava/classpath/gnu/xml/dom/DomText.java +++ b/libjava/classpath/gnu/xml/dom/DomText.java @@ -1,4 +1,4 @@ -/* DomText.java -- +/* DomText.java -- Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,24 +45,24 @@ import org.w3c.dom.Text; /** * <p> "Text" implementation. </p> * - * @author David Brownell + * @author David Brownell * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DomText extends DomCharacterData implements Text { - + // NOTE: deleted unused per-instance "isIgnorable" // support to reclaim its space. - + /** * Constructs a text node associated with the specified * document and holding the specified data. * * <p>This constructor should only be invoked by a Document object * as part of its createTextNode functionality, or through a subclass - * which is similarly used in a "Sub-DOM" style layer. + * which is similarly used in a "Sub-DOM" style layer. */ protected DomText(DomDocument owner, String value) { @@ -112,7 +112,7 @@ public class DomText String before = text.substring(0, offset); String after = text.substring(offset); Text next; - + if (getNodeType() == TEXT_NODE) { next = owner.createTextNode(after); @@ -121,7 +121,7 @@ public class DomText { next = owner.createCDATASection(after); } - + if (this.next != null) { parent.insertBefore(next, this.next); @@ -132,16 +132,16 @@ public class DomText } setNodeValue(before); return next; - + } catch (IndexOutOfBoundsException x) { throw new DomDOMException(DOMException.INDEX_SIZE_ERR); } } - + // DOM Level 3 - + public boolean isElementContentWhitespace() { if (parent != null) @@ -192,7 +192,7 @@ public class DomText { setNodeValue(content); } - + DomNode ref = this; DomNode ctx; for (ctx = previous; ctx != null && @@ -218,5 +218,5 @@ public class DomText } return (isEmpty) ? null : this; } - + } diff --git a/libjava/classpath/gnu/xml/dom/DomXPathExpression.java b/libjava/classpath/gnu/xml/dom/DomXPathExpression.java index 2518752..0b69629 100644 --- a/libjava/classpath/gnu/xml/dom/DomXPathExpression.java +++ b/libjava/classpath/gnu/xml/dom/DomXPathExpression.java @@ -1,4 +1,4 @@ -/* DomXPathExpression.java -- +/* DomXPathExpression.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -73,13 +73,13 @@ implements org.w3c.dom.xpath.XPathExpression { this.doc = doc; this.resolver = resolver; - - XPathFactory factory = XPathFactory.newInstance(); - XPath xpath = factory.newXPath(); - if (resolver != null) - { - xpath.setNamespaceContext(new DomNSResolverContext(resolver)); - } + + XPathFactory factory = XPathFactory.newInstance(); + XPath xpath = factory.newXPath(); + if (resolver != null) + { + xpath.setNamespaceContext(new DomNSResolverContext(resolver)); + } try { this.expression = xpath.compile(expression); @@ -87,61 +87,61 @@ implements org.w3c.dom.xpath.XPathExpression catch (XPathExpressionException e) { throw new XPathException(XPathException.INVALID_EXPRESSION_ERR, - e.getMessage ()); + e.getMessage ()); } } public Object evaluate(Node contextNode, short type, Object result) throws XPathException, DOMException { - try - { - QName typeName = null; - switch (type) - { - case XPathResult.BOOLEAN_TYPE: - typeName = XPathConstants.BOOLEAN; - break; - case XPathResult.NUMBER_TYPE: - typeName = XPathConstants.NUMBER; - break; - case XPathResult.STRING_TYPE: - typeName = XPathConstants.STRING; - break; - case XPathResult.ANY_UNORDERED_NODE_TYPE: - case XPathResult.FIRST_ORDERED_NODE_TYPE: - typeName = XPathConstants.NODE; - break; - case XPathResult.UNORDERED_NODE_ITERATOR_TYPE: - case XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE: - case XPathResult.ORDERED_NODE_ITERATOR_TYPE: - case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE: - typeName = XPathConstants.NODESET; - break; - default: - throw new XPathException(XPathException.TYPE_ERR, null); - } - Object val = expression.evaluate(contextNode, typeName); - switch (type) - { - case XPathResult.ORDERED_NODE_ITERATOR_TYPE: - case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE: - // Sort the nodes - List ns = new ArrayList((Collection) val); - Collections.sort(ns, new DocumentOrderComparator()); - val = ns; - } - return new DomXPathResult(val, type); - } - catch (javax.xml.xpath.XPathException e) - { - throw new XPathException(XPathException.TYPE_ERR, e.getMessage()); - } + try + { + QName typeName = null; + switch (type) + { + case XPathResult.BOOLEAN_TYPE: + typeName = XPathConstants.BOOLEAN; + break; + case XPathResult.NUMBER_TYPE: + typeName = XPathConstants.NUMBER; + break; + case XPathResult.STRING_TYPE: + typeName = XPathConstants.STRING; + break; + case XPathResult.ANY_UNORDERED_NODE_TYPE: + case XPathResult.FIRST_ORDERED_NODE_TYPE: + typeName = XPathConstants.NODE; + break; + case XPathResult.UNORDERED_NODE_ITERATOR_TYPE: + case XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE: + case XPathResult.ORDERED_NODE_ITERATOR_TYPE: + case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE: + typeName = XPathConstants.NODESET; + break; + default: + throw new XPathException(XPathException.TYPE_ERR, null); + } + Object val = expression.evaluate(contextNode, typeName); + switch (type) + { + case XPathResult.ORDERED_NODE_ITERATOR_TYPE: + case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE: + // Sort the nodes + List ns = new ArrayList((Collection) val); + Collections.sort(ns, new DocumentOrderComparator()); + val = ns; + } + return new DomXPathResult(val, type); + } + catch (javax.xml.xpath.XPathException e) + { + throw new XPathException(XPathException.TYPE_ERR, e.getMessage()); + } } public String toString () { return getClass ().getName () + "[expression=" + expression + "]"; } - + } diff --git a/libjava/classpath/gnu/xml/dom/DomXPathNSResolver.java b/libjava/classpath/gnu/xml/dom/DomXPathNSResolver.java index 96dfd97..fb0719a 100644 --- a/libjava/classpath/gnu/xml/dom/DomXPathNSResolver.java +++ b/libjava/classpath/gnu/xml/dom/DomXPathNSResolver.java @@ -1,4 +1,4 @@ -/* DomXPathNSResolver.java -- +/* DomXPathNSResolver.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,5 +60,5 @@ implements XPathNSResolver { return node.lookupNamespaceURI (prefix); } - + } diff --git a/libjava/classpath/gnu/xml/dom/DomXPathResult.java b/libjava/classpath/gnu/xml/dom/DomXPathResult.java index bed2496..da8fcf5 100644 --- a/libjava/classpath/gnu/xml/dom/DomXPathResult.java +++ b/libjava/classpath/gnu/xml/dom/DomXPathResult.java @@ -1,4 +1,4 @@ -/* DomXPathResult.java -- +/* DomXPathResult.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/dom/ImplementationList.java b/libjava/classpath/gnu/xml/dom/ImplementationList.java index 8c0f449..c99f55d 100644 --- a/libjava/classpath/gnu/xml/dom/ImplementationList.java +++ b/libjava/classpath/gnu/xml/dom/ImplementationList.java @@ -1,4 +1,4 @@ -/* ImplementationList.java -- +/* ImplementationList.java -- Copyright (C) 2004 Free Software Foundation, Inc.. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/dom/ImplementationSource.java b/libjava/classpath/gnu/xml/dom/ImplementationSource.java index 913079c..5f40442 100644 --- a/libjava/classpath/gnu/xml/dom/ImplementationSource.java +++ b/libjava/classpath/gnu/xml/dom/ImplementationSource.java @@ -1,4 +1,4 @@ -/* ImplementationSource.java -- +/* ImplementationSource.java -- Copyright (C) 2004 Free Software Foundation, Inc.. This file is part of GNU Classpath. @@ -72,7 +72,7 @@ public class ImplementationSource } catch (Exception e) { - // libxmlj not available + // libxmlj not available } catch (UnsatisfiedLinkError e) { diff --git a/libjava/classpath/gnu/xml/dom/JAXPFactory.java b/libjava/classpath/gnu/xml/dom/JAXPFactory.java index ca14a8e..d7d399b 100644 --- a/libjava/classpath/gnu/xml/dom/JAXPFactory.java +++ b/libjava/classpath/gnu/xml/dom/JAXPFactory.java @@ -1,4 +1,4 @@ -/* JAXPFactory.java -- +/* JAXPFactory.java -- Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -66,20 +66,20 @@ import javax.xml.parsers.SAXParserFactory; public final class JAXPFactory extends DocumentBuilderFactory { - - private static final String PROPERTY = "http://xml.org/sax/properties/"; - private static final String FEATURE = "http://xml.org/sax/features/"; - - private SAXParserFactory pf; + + private static final String PROPERTY = "http://xml.org/sax/properties/"; + private static final String FEATURE = "http://xml.org/sax/features/"; + + private SAXParserFactory pf; private boolean secureProcessing; - + /** * Default constructor. */ public JAXPFactory() { } - + /** * Constructs a JAXP document builder which uses the default * JAXP SAX2 parser and the DOM implementation in this package. @@ -94,14 +94,14 @@ public final class JAXPFactory pf = new gnu.xml.aelfred2.JAXPFactory(); // pf = SAXParserFactory.newInstance (); } - + // JAXP default: false pf.setValidating(isValidating()); // FIXME: this namespace setup may cause errors in some // conformant SAX2 parsers, which we CAN patch up by // splicing a "NSFilter" stage up front ... - + // JAXP default: false pf.setNamespaceAware(isNamespaceAware()); @@ -118,7 +118,7 @@ public final class JAXPFactory throw new ParserConfigurationException(msg); } } - + /** There seems to be no useful specification for attribute names */ public void setAttribute(String name, Object value) throws IllegalArgumentException @@ -160,21 +160,21 @@ public final class JAXPFactory return secureProcessing; throw new ParserConfigurationException(name); } - + static final class JAXPBuilder extends DocumentBuilder implements ErrorHandler { - private Consumer consumer; - private XMLReader producer; - private DomImpl impl; - + private Consumer consumer; + private XMLReader producer; + private DomImpl impl; + JAXPBuilder(XMLReader parser, JAXPFactory factory) throws ParserConfigurationException { impl = new DomImpl(); - + // set up consumer side try { @@ -198,8 +198,8 @@ public final class JAXPFactory try { - String id; - + String id; + // if validating, report validity errors, and default // to treating them as fatal if (factory.isValidating ()) @@ -207,7 +207,7 @@ public final class JAXPFactory producer.setFeature(FEATURE + "validation", true); producer.setErrorHandler(this); } - + // always save prefix info, maybe do namespace processing producer.setFeature(FEATURE + "namespace-prefixes", true); producer.setFeature(FEATURE + "namespaces", @@ -219,15 +219,15 @@ public final class JAXPFactory id = PROPERTY + "declaration-handler"; producer.setProperty(id, consumer.getProperty(id)); - + } catch (SAXException e) { throw new ParserConfigurationException(e.getMessage()); } } - - public Document parse(InputSource source) + + public Document parse(InputSource source) throws SAXException, IOException { producer.parse(source); @@ -283,27 +283,26 @@ public final class JAXPFactory { return new DomDocument(); } - + // implementation of error handler that's used when validating public void fatalError(SAXParseException e) throws SAXException { throw e; } - + public void error(SAXParseException e) throws SAXException { throw e; } - + public void warning(SAXParseException e) throws SAXException { /* ignore */ } - + } } - diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLAnchorElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLAnchorElement.java index 5da9133..4448dd5 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLAnchorElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLAnchorElement.java @@ -1,4 +1,4 @@ -/* DomHTMLAnchorElement.java -- +/* DomHTMLAnchorElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLAnchorElement { setHTMLAttribute("accesskey", accessKey); } - + public String getCharset() { return getHTMLAttribute("charset"); @@ -74,7 +74,7 @@ public class DomHTMLAnchorElement { setHTMLAttribute("charset", charset); } - + public String getCoords() { return getHTMLAttribute("coords"); @@ -84,7 +84,7 @@ public class DomHTMLAnchorElement { setHTMLAttribute("coords", coords); } - + public String getHref() { return getHTMLAttribute("href"); @@ -94,7 +94,7 @@ public class DomHTMLAnchorElement { setHTMLAttribute("href", href); } - + public String getHreflang() { return getHTMLAttribute("hreflang"); @@ -104,7 +104,7 @@ public class DomHTMLAnchorElement { setHTMLAttribute("hreflang", hreflang); } - + public String getName() { return getHTMLAttribute("name"); @@ -114,7 +114,7 @@ public class DomHTMLAnchorElement { setHTMLAttribute("name", name); } - + public String getRel() { return getHTMLAttribute("rel"); @@ -124,7 +124,7 @@ public class DomHTMLAnchorElement { setHTMLAttribute("rel", rel); } - + public String getRev() { return getHTMLAttribute("rev"); @@ -134,7 +134,7 @@ public class DomHTMLAnchorElement { setHTMLAttribute("rev", rev); } - + public String getShape() { return getHTMLAttribute("shape"); @@ -144,7 +144,7 @@ public class DomHTMLAnchorElement { setHTMLAttribute("shape", shape); } - + public int getTabIndex() { return getIntHTMLAttribute("tabindex"); @@ -154,7 +154,7 @@ public class DomHTMLAnchorElement { setIntHTMLAttribute("tabindex", tabIndex); } - + public String getTarget() { return getHTMLAttribute("target"); @@ -164,7 +164,7 @@ public class DomHTMLAnchorElement { setHTMLAttribute("target", target); } - + public String getType() { return getHTMLAttribute("type"); @@ -184,6 +184,5 @@ public class DomHTMLAnchorElement { dispatchUIEvent("focus"); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLAppletElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLAppletElement.java index 918cf0d..429fb00 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLAppletElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLAppletElement.java @@ -1,4 +1,4 @@ -/* DomHTMLAppletElement.java -- +/* DomHTMLAppletElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLAppletElement { setHTMLAttribute("align", align); } - + public String getCls() { return getHTMLAttribute("class"); @@ -74,7 +74,7 @@ public class DomHTMLAppletElement { setHTMLAttribute("class", cls); } - + public String getSrc() { return getHTMLAttribute("src"); @@ -84,7 +84,7 @@ public class DomHTMLAppletElement { setHTMLAttribute("src", src); } - + public String getAlt() { return getHTMLAttribute("alt"); @@ -94,7 +94,7 @@ public class DomHTMLAppletElement { setHTMLAttribute("alt", alt); } - + public String getArchive() { return getHTMLAttribute("archive"); @@ -104,7 +104,7 @@ public class DomHTMLAppletElement { setHTMLAttribute("archive", archive); } - + public String getCode() { return getHTMLAttribute("code"); @@ -114,7 +114,7 @@ public class DomHTMLAppletElement { setHTMLAttribute("code", code); } - + public String getCodeBase() { return getHTMLAttribute("codebase"); @@ -124,7 +124,7 @@ public class DomHTMLAppletElement { setHTMLAttribute("codebase", codeBase); } - + public String getHeight() { return getHTMLAttribute("height"); @@ -134,7 +134,7 @@ public class DomHTMLAppletElement { setHTMLAttribute("height", height); } - + public int getHspace() { return getIntHTMLAttribute("hspace"); @@ -144,7 +144,7 @@ public class DomHTMLAppletElement { setIntHTMLAttribute("hspace", hspace); } - + public String getName() { return getHTMLAttribute("name"); @@ -154,7 +154,7 @@ public class DomHTMLAppletElement { setHTMLAttribute("name", name); } - + public String getObject() { return getHTMLAttribute("object"); @@ -164,7 +164,7 @@ public class DomHTMLAppletElement { setHTMLAttribute("object", object); } - + public int getVspace() { return getIntHTMLAttribute("vspace"); @@ -174,7 +174,7 @@ public class DomHTMLAppletElement { setIntHTMLAttribute("vspace", vspace); } - + public String getWidth() { return getHTMLAttribute("width"); @@ -185,4 +185,3 @@ public class DomHTMLAppletElement setHTMLAttribute("width", width); } } - diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLAreaElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLAreaElement.java index d7eed07..728b3fd 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLAreaElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLAreaElement.java @@ -1,4 +1,4 @@ -/* DomHTMLAreaElement.java -- +/* DomHTMLAreaElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLAreaElement { setHTMLAttribute("accesskey", accessKey); } - + public String getAlt() { return getHTMLAttribute("alt"); @@ -74,7 +74,7 @@ public class DomHTMLAreaElement { setHTMLAttribute("alt", alt); } - + public String getCoords() { return getHTMLAttribute("coords"); @@ -84,7 +84,7 @@ public class DomHTMLAreaElement { setHTMLAttribute("coords", coords); } - + public String getHref() { return getHTMLAttribute("href"); @@ -94,7 +94,7 @@ public class DomHTMLAreaElement { setHTMLAttribute("href", href); } - + public boolean getNoHref() { return getBooleanHTMLAttribute("nohref"); @@ -104,7 +104,7 @@ public class DomHTMLAreaElement { setBooleanHTMLAttribute("nohref", nohref); } - + public String getShape() { return getHTMLAttribute("shape"); @@ -114,7 +114,7 @@ public class DomHTMLAreaElement { setHTMLAttribute("shape", shape); } - + public int getTabIndex() { return getIntHTMLAttribute("tabindex"); @@ -124,7 +124,7 @@ public class DomHTMLAreaElement { setIntHTMLAttribute("tabindex", tabIndex); } - + public String getTarget() { return getHTMLAttribute("target"); @@ -134,6 +134,5 @@ public class DomHTMLAreaElement { setHTMLAttribute("target", target); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLBRElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLBRElement.java index 673699d..5ad49c5 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLBRElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLBRElement.java @@ -1,4 +1,4 @@ -/* DomHTMLBRElement.java -- +/* DomHTMLBRElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLBRElement { setHTMLAttribute("clear", clear); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLBaseElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLBaseElement.java index ddc8053..99a0993 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLBaseElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLBaseElement.java @@ -1,4 +1,4 @@ -/* DomHTMLBaseElement.java -- +/* DomHTMLBaseElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLBaseElement { setHTMLAttribute("href", href); } - + public String getTarget() { return getHTMLAttribute("target"); @@ -74,6 +74,5 @@ public class DomHTMLBaseElement { setHTMLAttribute("target", target); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLBaseFontElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLBaseFontElement.java index 73172d3..73ec96d 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLBaseFontElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLBaseFontElement.java @@ -1,4 +1,4 @@ -/* DomHTMLBaseFontElement.java -- +/* DomHTMLBaseFontElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLBaseFontElement { setHTMLAttribute("color", color); } - + public String getFace() { return getHTMLAttribute("face"); @@ -74,7 +74,7 @@ public class DomHTMLBaseFontElement { setHTMLAttribute("face", face); } - + public int getSize() { return getIntHTMLAttribute("size"); @@ -84,6 +84,5 @@ public class DomHTMLBaseFontElement { setIntHTMLAttribute("size", size); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLBodyElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLBodyElement.java index 44fbcf2..d452862 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLBodyElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLBodyElement.java @@ -1,4 +1,4 @@ -/* DomHTMLBodyElement.java -- +/* DomHTMLBodyElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLBodyElement { setHTMLAttribute("alink", alink); } - + public String getBackground() { return getHTMLAttribute("background"); @@ -74,7 +74,7 @@ public class DomHTMLBodyElement { setHTMLAttribute("background", background); } - + public String getBgColor() { return getHTMLAttribute("bgcolor"); @@ -84,7 +84,7 @@ public class DomHTMLBodyElement { setHTMLAttribute("bgcolor", bgcolor); } - + public String getLink() { return getHTMLAttribute("link"); @@ -94,7 +94,7 @@ public class DomHTMLBodyElement { setHTMLAttribute("link", link); } - + public String getText() { return getHTMLAttribute("text"); @@ -104,7 +104,7 @@ public class DomHTMLBodyElement { setHTMLAttribute("text", text); } - + public String getVLink() { return getHTMLAttribute("vlink"); @@ -114,6 +114,5 @@ public class DomHTMLBodyElement { setHTMLAttribute("vlink", vlink); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLButtonElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLButtonElement.java index 3bca44c..696169a 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLButtonElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLButtonElement.java @@ -1,4 +1,4 @@ -/* DomHTMLButtonElement.java -- +/* DomHTMLButtonElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,7 +70,7 @@ public class DomHTMLButtonElement { setHTMLAttribute("accesskey", accessKey); } - + public boolean getDisabled() { return getBooleanHTMLAttribute("disabled"); @@ -80,7 +80,7 @@ public class DomHTMLButtonElement { setBooleanHTMLAttribute("disabled", disabled); } - + public String getName() { return getHTMLAttribute("name"); @@ -90,7 +90,7 @@ public class DomHTMLButtonElement { setHTMLAttribute("name", name); } - + public int getTabIndex() { return getIntHTMLAttribute("tabindex"); @@ -105,7 +105,7 @@ public class DomHTMLButtonElement { return getHTMLAttribute("type"); } - + public String getValue() { return getHTMLAttribute("value"); @@ -115,6 +115,5 @@ public class DomHTMLButtonElement { setHTMLAttribute("value", value); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLCollection.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLCollection.java index c636200..8300287 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLCollection.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLCollection.java @@ -1,4 +1,4 @@ -/* DomHTMLCollection.java -- +/* DomHTMLCollection.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -221,6 +221,5 @@ class DomHTMLCollection } return null; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLDListElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLDListElement.java index 2b9dbf2..9acce85 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLDListElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLDListElement.java @@ -1,4 +1,4 @@ -/* DomHTMLDListElement.java -- +/* DomHTMLDListElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLDListElement { setBooleanHTMLAttribute("compact", compact); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLDirectoryElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLDirectoryElement.java index 26af97e..e0f94a1 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLDirectoryElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLDirectoryElement.java @@ -1,4 +1,4 @@ -/* DomHTMLDirectoryElement.java -- +/* DomHTMLDirectoryElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLDirectoryElement { setBooleanHTMLAttribute("compact", compact); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLDivElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLDivElement.java index 462069d..66b3ac7 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLDivElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLDivElement.java @@ -1,4 +1,4 @@ -/* DomHTMLDivElement.java -- +/* DomHTMLDivElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLDivElement { setHTMLAttribute("align", align); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLDocument.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLDocument.java index d45c1b2..1afed7b 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLDocument.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLDocument.java @@ -1,4 +1,4 @@ -/* DomHTMLDocument.java -- +/* DomHTMLDocument.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -424,4 +424,3 @@ public class DomHTMLDocument } } - diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLElement.java index b957083..deeefec 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLElement.java @@ -1,4 +1,4 @@ -/* DomHTMLElement.java -- +/* DomHTMLElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -242,7 +242,7 @@ public abstract class DomHTMLElement { setHTMLAttribute("id", id); } - + public String getTitle() { return getHTMLAttribute("title"); @@ -252,7 +252,7 @@ public abstract class DomHTMLElement { setHTMLAttribute("title", title); } - + public String getLang() { return getHTMLAttribute("lang"); @@ -262,7 +262,7 @@ public abstract class DomHTMLElement { setHTMLAttribute("lang", lang); } - + public String getDir() { return getHTMLAttribute("dir"); @@ -272,7 +272,7 @@ public abstract class DomHTMLElement { setHTMLAttribute("dir", dir); } - + public String getClassName() { return getHTMLAttribute("class"); @@ -282,6 +282,5 @@ public abstract class DomHTMLElement { setHTMLAttribute("class", className); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLEmbedElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLEmbedElement.java index 1ae081c..2211315 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLEmbedElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLEmbedElement.java @@ -1,4 +1,4 @@ -/* DomHTMLEmbedElement.java -- +/* DomHTMLEmbedElement.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -46,7 +46,7 @@ public class DomHTMLEmbedElement { super(owner, namespaceURI, name); } - + public String getJavaObject() { return getHTMLAttribute("java_object"); @@ -56,7 +56,7 @@ public class DomHTMLEmbedElement { setHTMLAttribute("java_object", object); } - + public String getJavaCodeBase() { return getHTMLAttribute("java_codebase"); @@ -66,7 +66,7 @@ public class DomHTMLEmbedElement { setHTMLAttribute("java_codebase", codeBase); } - + public String getJavaArchive() { return getHTMLAttribute("java_archive"); @@ -81,42 +81,42 @@ public class DomHTMLEmbedElement { setHTMLAttribute("java_code", code); } - + public String getJavaCode() { return getHTMLAttribute("java_code"); } - + public void setJavaType(String type) { setHTMLAttribute("java_type", type); } - + public String getJavaType() { return getHTMLAttribute("java_type"); } - + public void setType(String type) { setHTMLAttribute("type", type); } - + public String getType() { return getHTMLAttribute("type"); } - + public String getPluginsPage() { return getHTMLAttribute("pluginspage"); } - + public void setPluginsPage(String pluginspage) { setHTMLAttribute("pluginspage", pluginspage); } - + public String getMayscript() { return getHTMLAttribute("mayscript"); diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLFieldSetElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLFieldSetElement.java index 2c85772..252cd3d 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLFieldSetElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLFieldSetElement.java @@ -1,4 +1,4 @@ -/* DomHTMLFieldSetElement.java -- +/* DomHTMLFieldSetElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -62,4 +62,3 @@ public class DomHTMLFieldSetElement } } - diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLFontElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLFontElement.java index 08bd349..5bfbb6f 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLFontElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLFontElement.java @@ -1,4 +1,4 @@ -/* DomHTMLFontElement.java -- +/* DomHTMLFontElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLFontElement { setHTMLAttribute("color", color); } - + public String getFace() { return getHTMLAttribute("face"); @@ -74,7 +74,7 @@ public class DomHTMLFontElement { setHTMLAttribute("face", face); } - + public String getSize() { return getHTMLAttribute("size"); @@ -84,6 +84,5 @@ public class DomHTMLFontElement { setHTMLAttribute("size", size); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLFormElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLFormElement.java index 119d97e..9fe2ae8 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLFormElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLFormElement.java @@ -1,4 +1,4 @@ -/* DomHTMLFormElement.java -- +/* DomHTMLFormElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -85,7 +85,7 @@ public class DomHTMLFormElement { setHTMLAttribute("name", name); } - + public String getAcceptCharset() { return getHTMLAttribute("accept-charset"); @@ -95,7 +95,7 @@ public class DomHTMLFormElement { setHTMLAttribute("accept-charset", acceptCharset); } - + public String getAction() { return getHTMLAttribute("action"); @@ -105,7 +105,7 @@ public class DomHTMLFormElement { setHTMLAttribute("action", action); } - + public String getEnctype() { return getHTMLAttribute("enctype"); @@ -115,7 +115,7 @@ public class DomHTMLFormElement { setHTMLAttribute("enctype", enctype); } - + public String getMethod() { return getHTMLAttribute("method"); @@ -125,7 +125,7 @@ public class DomHTMLFormElement { setHTMLAttribute("method", method); } - + public String getTarget() { return getHTMLAttribute("target"); @@ -145,6 +145,5 @@ public class DomHTMLFormElement { dispatchUIEvent("reset"); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLFrameElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLFrameElement.java index 124f352..2465c4b 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLFrameElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLFrameElement.java @@ -1,4 +1,4 @@ -/* DomHTMLFrameElement.java -- +/* DomHTMLFrameElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -65,7 +65,7 @@ public class DomHTMLFrameElement { setHTMLAttribute("frameborder", frameBorder); } - + public String getLongDesc() { return getHTMLAttribute("longdesc"); @@ -75,7 +75,7 @@ public class DomHTMLFrameElement { setHTMLAttribute("longdesc", longDesc); } - + public String getMarginHeight() { return getHTMLAttribute("marginheight"); @@ -85,7 +85,7 @@ public class DomHTMLFrameElement { setHTMLAttribute("marginheight", marginHeight); } - + public String getMarginWidth() { return getHTMLAttribute("marginwidth"); @@ -95,7 +95,7 @@ public class DomHTMLFrameElement { setHTMLAttribute("marginwidth", marginWidth); } - + public String getName() { return getHTMLAttribute("name"); @@ -105,7 +105,7 @@ public class DomHTMLFrameElement { setHTMLAttribute("name", name); } - + public boolean getNoResize() { return getBooleanHTMLAttribute("noresize"); @@ -115,7 +115,7 @@ public class DomHTMLFrameElement { setBooleanHTMLAttribute("noresize", noResize); } - + public String getScrolling() { return getHTMLAttribute("scrolling"); @@ -125,7 +125,7 @@ public class DomHTMLFrameElement { setHTMLAttribute("scrolling", scrolling); } - + public String getSrc() { return getHTMLAttribute("src"); @@ -141,6 +141,5 @@ public class DomHTMLFrameElement // TODO getContentDocument return null; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLFrameSetElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLFrameSetElement.java index 44d317f..dae9430 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLFrameSetElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLFrameSetElement.java @@ -1,4 +1,4 @@ -/* DomHTMLFrameSetElement.java -- +/* DomHTMLFrameSetElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLFrameSetElement { setHTMLAttribute("cols", cols); } - + public String getRows() { return getHTMLAttribute("rows"); @@ -74,6 +74,5 @@ public class DomHTMLFrameSetElement { setHTMLAttribute("rows", rows); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLHRElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLHRElement.java index d1b4801..e27ef55 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLHRElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLHRElement.java @@ -1,4 +1,4 @@ -/* DomHTMLHRElement.java -- +/* DomHTMLHRElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLHRElement { setHTMLAttribute("align", align); } - + public boolean getNoShade() { return getBooleanHTMLAttribute("noshade"); @@ -74,7 +74,7 @@ public class DomHTMLHRElement { setBooleanHTMLAttribute("noshade", noShade); } - + public String getSize() { return getHTMLAttribute("size"); @@ -84,7 +84,7 @@ public class DomHTMLHRElement { setHTMLAttribute("size", size); } - + public String getWidth() { return getHTMLAttribute("width"); @@ -94,6 +94,5 @@ public class DomHTMLHRElement { setHTMLAttribute("width", width); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLHeadElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLHeadElement.java index f68e8c7..4a8ef995 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLHeadElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLHeadElement.java @@ -1,4 +1,4 @@ -/* DomHTMLHeadElement.java -- +/* DomHTMLHeadElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLHeadElement { setHTMLAttribute("profile", profile); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLHeadingElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLHeadingElement.java index f1427ad..6e78e90 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLHeadingElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLHeadingElement.java @@ -1,4 +1,4 @@ -/* DomHTMLHeadingElement.java -- +/* DomHTMLHeadingElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLHeadingElement { setHTMLAttribute("align", align); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLHtmlElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLHtmlElement.java index 95d4526..73f7243 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLHtmlElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLHtmlElement.java @@ -1,4 +1,4 @@ -/* DomHTMLHtmlElement.java -- +/* DomHTMLHtmlElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLHtmlElement { setHTMLAttribute("version", version); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLIFrameElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLIFrameElement.java index c5ca75d..1a58fb7 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLIFrameElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLIFrameElement.java @@ -1,4 +1,4 @@ -/* DomHTMLIFrameElement.java -- +/* DomHTMLIFrameElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -65,7 +65,7 @@ public class DomHTMLIFrameElement { setHTMLAttribute("align", align); } - + public String getFrameBorder() { return getHTMLAttribute("frameborder"); @@ -75,7 +75,7 @@ public class DomHTMLIFrameElement { setHTMLAttribute("frameborder", frameBorder); } - + public String getHeight() { return getHTMLAttribute("height"); @@ -85,7 +85,7 @@ public class DomHTMLIFrameElement { setHTMLAttribute("height", height); } - + public String getLongDesc() { return getHTMLAttribute("longdesc"); @@ -95,7 +95,7 @@ public class DomHTMLIFrameElement { setHTMLAttribute("longdesc", longDesc); } - + public String getMarginHeight() { return getHTMLAttribute("marginheight"); @@ -105,7 +105,7 @@ public class DomHTMLIFrameElement { setHTMLAttribute("marginheight", marginHeight); } - + public String getMarginWidth() { return getHTMLAttribute("marginwidth"); @@ -115,7 +115,7 @@ public class DomHTMLIFrameElement { setHTMLAttribute("marginwidth", marginWidth); } - + public String getName() { return getHTMLAttribute("name"); @@ -125,7 +125,7 @@ public class DomHTMLIFrameElement { setHTMLAttribute("name", name); } - + public String getScrolling() { return getHTMLAttribute("scrolling"); @@ -135,7 +135,7 @@ public class DomHTMLIFrameElement { setHTMLAttribute("scrolling", scrolling); } - + public String getSrc() { return getHTMLAttribute("src"); @@ -155,12 +155,11 @@ public class DomHTMLIFrameElement { setHTMLAttribute("width", width); } - + public Document getContentDocument() { // TODO getContentDocument return null; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLImageElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLImageElement.java index c96e5fe..c5d294c 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLImageElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLImageElement.java @@ -1,4 +1,4 @@ -/* DomHTMLImageElement.java -- +/* DomHTMLImageElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLImageElement { setHTMLAttribute("name", name); } - + public String getAlign() { return getHTMLAttribute("align"); @@ -74,7 +74,7 @@ public class DomHTMLImageElement { setHTMLAttribute("align", align); } - + public String getAlt() { return getHTMLAttribute("alt"); @@ -84,7 +84,7 @@ public class DomHTMLImageElement { setHTMLAttribute("alt", alt); } - + public String getBorder() { return getHTMLAttribute("border"); @@ -94,7 +94,7 @@ public class DomHTMLImageElement { setHTMLAttribute("border", border); } - + public int getHeight() { return getIntHTMLAttribute("height"); @@ -104,7 +104,7 @@ public class DomHTMLImageElement { setIntHTMLAttribute("height", height); } - + public int getHspace() { return getIntHTMLAttribute("hspace"); @@ -114,7 +114,7 @@ public class DomHTMLImageElement { setIntHTMLAttribute("hspace", hspace); } - + public boolean getIsMap() { return getBooleanHTMLAttribute("ismap"); @@ -124,7 +124,7 @@ public class DomHTMLImageElement { setBooleanHTMLAttribute("ismap", isMap); } - + public String getLongDesc() { return getHTMLAttribute("longdesc"); @@ -134,7 +134,7 @@ public class DomHTMLImageElement { setHTMLAttribute("longdesc", longDesc); } - + public String getSrc() { return getHTMLAttribute("src"); @@ -154,7 +154,7 @@ public class DomHTMLImageElement { setHTMLAttribute("usemap", useMap); } - + public int getVspace() { return getIntHTMLAttribute("vspace"); @@ -164,7 +164,7 @@ public class DomHTMLImageElement { setIntHTMLAttribute("vspace", vspace); } - + public int getWidth() { return getIntHTMLAttribute("width"); @@ -174,6 +174,5 @@ public class DomHTMLImageElement { setIntHTMLAttribute("width", width); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLImpl.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLImpl.java index 9f0db08..a5faee5 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLImpl.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLImpl.java @@ -1,4 +1,4 @@ -/* DomHTMLImpl.java -- +/* DomHTMLImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,7 +48,7 @@ import org.w3c.dom.Document; public class DomHTMLImpl extends DomImpl { - + protected Document createDocument() { return new DomHTMLDocument(this); @@ -64,4 +64,3 @@ public class DomHTMLImpl } } - diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLInputElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLInputElement.java index 1dbc9c2..2120188 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLInputElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLInputElement.java @@ -1,4 +1,4 @@ -/* DomHTMLInputElement.java -- +/* DomHTMLInputElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -68,7 +68,7 @@ public class DomHTMLInputElement { setHTMLAttribute("value", defaultValue); } - + public boolean getDefaultChecked() { return getBooleanHTMLAttribute("checked"); @@ -83,7 +83,7 @@ public class DomHTMLInputElement { return (HTMLFormElement) getParentElement("form"); } - + public String getAccept() { return getHTMLAttribute("accept"); @@ -93,7 +93,7 @@ public class DomHTMLInputElement { setHTMLAttribute("accept", accept); } - + public String getAccessKey() { return getHTMLAttribute("accesskey"); @@ -103,7 +103,7 @@ public class DomHTMLInputElement { setHTMLAttribute("accesskey", accessKey); } - + public String getAlign() { return getHTMLAttribute("align"); @@ -113,7 +113,7 @@ public class DomHTMLInputElement { setHTMLAttribute("align", align); } - + public String getAlt() { return getHTMLAttribute("alt"); @@ -123,7 +123,7 @@ public class DomHTMLInputElement { setHTMLAttribute("alt", alt); } - + public boolean getChecked() { if (checked == null) @@ -137,7 +137,7 @@ public class DomHTMLInputElement { this.checked = Boolean.valueOf(checked); } - + public boolean getDisabled() { return getBooleanHTMLAttribute("disabled"); @@ -147,7 +147,7 @@ public class DomHTMLInputElement { setBooleanHTMLAttribute("disabled", disabled); } - + public int getMaxLength() { return getIntHTMLAttribute("maxLength"); @@ -157,7 +157,7 @@ public class DomHTMLInputElement { setIntHTMLAttribute("maxLength", maxLength); } - + public String getName() { return getHTMLAttribute("name"); @@ -167,7 +167,7 @@ public class DomHTMLInputElement { setHTMLAttribute("name", name); } - + public boolean getReadOnly() { return getBooleanHTMLAttribute("readonly"); @@ -177,7 +177,7 @@ public class DomHTMLInputElement { setBooleanHTMLAttribute("readonly", readOnly); } - + public int getSize() { return getIntHTMLAttribute("size"); @@ -187,7 +187,7 @@ public class DomHTMLInputElement { setIntHTMLAttribute("size", size); } - + public String getSrc() { return getHTMLAttribute("src"); @@ -197,7 +197,7 @@ public class DomHTMLInputElement { setHTMLAttribute("src", src); } - + public int getTabIndex() { return getIntHTMLAttribute("tabindex"); @@ -207,7 +207,7 @@ public class DomHTMLInputElement { setIntHTMLAttribute("tabindex", tabIndex); } - + public String getType() { return getHTMLAttribute("type"); @@ -217,7 +217,7 @@ public class DomHTMLInputElement { setHTMLAttribute("type", type); } - + public String getUseMap() { return getHTMLAttribute("usemap"); @@ -227,7 +227,7 @@ public class DomHTMLInputElement { setHTMLAttribute("usemap", useMap); } - + public String getValue() { if (value == null) @@ -261,6 +261,5 @@ public class DomHTMLInputElement { dispatchUIEvent("click"); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLIsIndexElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLIsIndexElement.java index 087f4a0..8578cb6 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLIsIndexElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLIsIndexElement.java @@ -1,4 +1,4 @@ -/* DomHTMLIsIndexElement.java -- +/* DomHTMLIsIndexElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,6 +70,5 @@ public class DomHTMLIsIndexElement { setHTMLAttribute("prompt", prompt); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLLIElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLLIElement.java index 11eccdf..cab1412 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLLIElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLLIElement.java @@ -1,4 +1,4 @@ -/* DomHTMLLIElement.java -- +/* DomHTMLLIElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLLIElement { setHTMLAttribute("type", type); } - + public int getValue() { return getIntHTMLAttribute("value"); @@ -74,6 +74,5 @@ public class DomHTMLLIElement { setIntHTMLAttribute("value", value); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLLabelElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLLabelElement.java index c0cc39f..96cfbaa 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLLabelElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLLabelElement.java @@ -1,4 +1,4 @@ -/* DomHTMLLabelElement.java -- +/* DomHTMLLabelElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,7 +70,7 @@ public class DomHTMLLabelElement { setHTMLAttribute("accesskey", accessKey); } - + public String getHtmlFor() { return getHTMLAttribute("for"); @@ -80,6 +80,5 @@ public class DomHTMLLabelElement { setHTMLAttribute("for", htmlFor); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLLegendElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLLegendElement.java index a500f8f..045861c 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLLegendElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLLegendElement.java @@ -1,4 +1,4 @@ -/* DomHTMLLegendElement.java -- +/* DomHTMLLegendElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,7 +70,7 @@ public class DomHTMLLegendElement { setHTMLAttribute("accesskey", accessKey); } - + public String getAlign() { return getHTMLAttribute("align"); @@ -80,6 +80,5 @@ public class DomHTMLLegendElement { setHTMLAttribute("align", align); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLLinkElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLLinkElement.java index 127726e..292ec93 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLLinkElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLLinkElement.java @@ -1,4 +1,4 @@ -/* DomHTMLLinkElement.java -- +/* DomHTMLLinkElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLLinkElement { setBooleanHTMLAttribute("disabled", disabled); } - + public String getCharset() { return getHTMLAttribute("charset"); @@ -74,7 +74,7 @@ public class DomHTMLLinkElement { setHTMLAttribute("charset", charset); } - + public String getHref() { return getHTMLAttribute("href"); @@ -84,7 +84,7 @@ public class DomHTMLLinkElement { setHTMLAttribute("href", href); } - + public String getHreflang() { return getHTMLAttribute("hreflang"); @@ -94,7 +94,7 @@ public class DomHTMLLinkElement { setHTMLAttribute("hreflang", hreflang); } - + public String getMedia() { return getHTMLAttribute("media"); @@ -104,7 +104,7 @@ public class DomHTMLLinkElement { setHTMLAttribute("media", media); } - + public String getRel() { return getHTMLAttribute("rel"); @@ -114,7 +114,7 @@ public class DomHTMLLinkElement { setHTMLAttribute("rel", rel); } - + public String getRev() { return getHTMLAttribute("rev"); @@ -124,7 +124,7 @@ public class DomHTMLLinkElement { setHTMLAttribute("rev", rev); } - + public String getTarget() { return getHTMLAttribute("target"); @@ -134,7 +134,7 @@ public class DomHTMLLinkElement { setHTMLAttribute("target", target); } - + public String getType() { return getHTMLAttribute("type"); @@ -144,6 +144,5 @@ public class DomHTMLLinkElement { setHTMLAttribute("type", type); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLMapElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLMapElement.java index 1f7182f..4497b00 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLMapElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLMapElement.java @@ -1,4 +1,4 @@ -/* DomHTMLMapElement.java -- +/* DomHTMLMapElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLMapElement ret.evaluate(); return ret; } - + public String getName() { return getHTMLAttribute("name"); @@ -74,6 +74,5 @@ public class DomHTMLMapElement { setHTMLAttribute("name", name); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLMenuElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLMenuElement.java index 17f6f58..2a6ff08 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLMenuElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLMenuElement.java @@ -1,4 +1,4 @@ -/* DomHTMLMenuElement.java -- +/* DomHTMLMenuElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLMenuElement { setBooleanHTMLAttribute("compact", compact); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLMetaElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLMetaElement.java index 1a04405..e555a42 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLMetaElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLMetaElement.java @@ -1,4 +1,4 @@ -/* DomHTMLMetaElement.java -- +/* DomHTMLMetaElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLMetaElement { setHTMLAttribute("content", content); } - + public String getHttpEquiv() { return getHTMLAttribute("http-equiv"); @@ -74,7 +74,7 @@ public class DomHTMLMetaElement { setHTMLAttribute("http-equiv", httpEquiv); } - + public String getName() { return getHTMLAttribute("name"); @@ -84,7 +84,7 @@ public class DomHTMLMetaElement { setHTMLAttribute("name", name); } - + public String getScheme() { return getHTMLAttribute("scheme"); @@ -94,6 +94,5 @@ public class DomHTMLMetaElement { setHTMLAttribute("scheme", scheme); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLModElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLModElement.java index 493f724..8c158f4 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLModElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLModElement.java @@ -1,4 +1,4 @@ -/* DomHTMLModElement.java -- +/* DomHTMLModElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLModElement { setHTMLAttribute("cite", cite); } - + public String getDateTime() { return getHTMLAttribute("datetime"); @@ -74,6 +74,5 @@ public class DomHTMLModElement { setHTMLAttribute("datetime", dateTime); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLOListElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLOListElement.java index fb98cf4..54f7fd4 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLOListElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLOListElement.java @@ -1,4 +1,4 @@ -/* DomHTMLOListElement.java -- +/* DomHTMLOListElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLOListElement { setBooleanHTMLAttribute("compact", compact); } - + public int getStart() { return getIntHTMLAttribute("start"); @@ -74,7 +74,7 @@ public class DomHTMLOListElement { setIntHTMLAttribute("start", start); } - + public String getType() { return getHTMLAttribute("type"); @@ -84,6 +84,5 @@ public class DomHTMLOListElement { setHTMLAttribute("type", type); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLObjectElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLObjectElement.java index 9bb6211..2ce5f45 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLObjectElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLObjectElement.java @@ -1,4 +1,4 @@ -/* DomHTMLObjectElement.java -- +/* DomHTMLObjectElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -71,7 +71,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("code", code); } - + public String getJavaCode() { return getHTMLAttribute("java_code"); @@ -81,7 +81,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("java_code", code); } - + public String getObject() { return getHTMLAttribute("object"); @@ -91,7 +91,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("object", obj); } - + public String getJavaObject() { return getHTMLAttribute("java_object"); @@ -101,7 +101,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("java_object", obj); } - + public String getAlign() { return getHTMLAttribute("align"); @@ -111,7 +111,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("align", align); } - + public String getArchive() { return getHTMLAttribute("archive"); @@ -121,7 +121,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("archive", archive); } - + public String getJavaArchive() { return getHTMLAttribute("java_archive"); @@ -131,7 +131,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("java_archive", archive); } - + public String getBorder() { return getHTMLAttribute("border"); @@ -141,7 +141,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("border", border); } - + public String getCodeBase() { return getHTMLAttribute("codebase"); @@ -151,7 +151,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("codebase", codeBase); } - + public String getJavaCodeBase() { return getHTMLAttribute("java_codebase"); @@ -161,7 +161,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("java_codebase", codeBase); } - + public String getCodeType() { return getHTMLAttribute("codetype"); @@ -171,7 +171,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("codetype", codeType); } - + public String getData() { return getHTMLAttribute("data"); @@ -181,7 +181,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("data", data); } - + public boolean getDeclare() { return getBooleanHTMLAttribute("declare"); @@ -191,7 +191,7 @@ public class DomHTMLObjectElement { setBooleanHTMLAttribute("declare", declare); } - + public String getHeight() { return getHTMLAttribute("height"); @@ -201,7 +201,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("height", height); } - + public int getHspace() { return getIntHTMLAttribute("hspace"); @@ -211,7 +211,7 @@ public class DomHTMLObjectElement { setIntHTMLAttribute("hspace", hspace); } - + public String getName() { return getHTMLAttribute("name"); @@ -221,7 +221,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("name", name); } - + public String getStandby() { return getHTMLAttribute("standby"); @@ -231,7 +231,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("standby", standby); } - + public int getTabIndex() { return getIntHTMLAttribute("tabindex"); @@ -241,7 +241,7 @@ public class DomHTMLObjectElement { setIntHTMLAttribute("tabindex", tabIndex); } - + public String getType() { return getHTMLAttribute("type"); @@ -251,7 +251,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("type", type); } - + public String getJavaType() { return getHTMLAttribute("java_type"); @@ -261,7 +261,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("java_type", type); } - + public String getUseMap() { return getHTMLAttribute("usemap"); @@ -271,7 +271,7 @@ public class DomHTMLObjectElement { setHTMLAttribute("usemap", useMap); } - + public int getVspace() { return getIntHTMLAttribute("vspace"); @@ -281,7 +281,7 @@ public class DomHTMLObjectElement { setIntHTMLAttribute("vspace", vspace); } - + public String getWidth() { return getHTMLAttribute("width"); @@ -297,25 +297,24 @@ public class DomHTMLObjectElement // TODO getContentDocument return null; } - + public void setMayscript(String may) { setHTMLAttribute("mayscript", may); } - + public String getMayscript() { return getHTMLAttribute("mayscript"); } - + public void setScriptable(String scr) { setHTMLAttribute("scriptable", scr); } - + public String getScriptable() { return getHTMLAttribute("scriptable"); } } - diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLOptGroupElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLOptGroupElement.java index 76545e1..acb9484 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLOptGroupElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLOptGroupElement.java @@ -1,4 +1,4 @@ -/* DomHTMLOptGroupElement.java -- +/* DomHTMLOptGroupElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -74,6 +74,5 @@ public class DomHTMLOptGroupElement { setHTMLAttribute("label", label); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLOptionElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLOptionElement.java index 69c059d..f775c13 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLOptionElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLOptionElement.java @@ -1,4 +1,4 @@ -/* DomHTMLOptionElement.java -- +/* DomHTMLOptionElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -82,7 +82,7 @@ public class DomHTMLOptionElement { return super.getIndex(); } - + public boolean getDisabled() { return getBooleanHTMLAttribute("disabled"); @@ -92,7 +92,7 @@ public class DomHTMLOptionElement { setBooleanHTMLAttribute("disabled", disabled); } - + public String getLabel() { return getHTMLAttribute("label"); @@ -102,7 +102,7 @@ public class DomHTMLOptionElement { setHTMLAttribute("label", label); } - + public boolean getSelected() { if (selected == null) @@ -116,7 +116,7 @@ public class DomHTMLOptionElement { this.selected = Boolean.valueOf(selected); } - + public String getValue() { return getHTMLAttribute("value"); @@ -126,6 +126,5 @@ public class DomHTMLOptionElement { setHTMLAttribute("value", value); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLParagraphElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLParagraphElement.java index 2a8c4f6..4c867fd 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLParagraphElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLParagraphElement.java @@ -1,4 +1,4 @@ -/* DomHTMLParagraphElement.java -- +/* DomHTMLParagraphElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLParagraphElement { setHTMLAttribute("align", align); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLParamElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLParamElement.java index 81c6559..cdd74ad 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLParamElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLParamElement.java @@ -1,4 +1,4 @@ -/* DomHTMLParamElement.java -- +/* DomHTMLParamElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLParamElement { setHTMLAttribute("name", name); } - + public String getType() { return getHTMLAttribute("type"); @@ -74,7 +74,7 @@ public class DomHTMLParamElement { setHTMLAttribute("type", type); } - + public String getValue() { return getHTMLAttribute("value"); @@ -84,7 +84,7 @@ public class DomHTMLParamElement { setHTMLAttribute("value", value); } - + public String getValueType() { return getHTMLAttribute("valuetype"); @@ -94,6 +94,5 @@ public class DomHTMLParamElement { setHTMLAttribute("valuetype", valueType); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLParser.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLParser.java index c6d8c4c..88656d2 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLParser.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLParser.java @@ -60,11 +60,11 @@ import org.w3c.dom.html2.HTMLDocument; * The tag attributes become the node attributes. The text inside * HTML tag is inserted as one or several text nodes. The nested * HTML tags are inserted as child nodes. - * + * * If the strict tree structure, closing the tag means closing all * nested tags. To work around this, this parser closes the nested * tags and immediately reopens them after the closed tag. - * In this way, <code><b><i>c</b>d</code> + * In this way, <code><b><i>c</b>d</code> * is parsed as <code><b><i>c</i></b><i>d</code> . * * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) @@ -124,9 +124,9 @@ public class DomHTMLParser document = new DomHTMLDocument(); document.setCheckWellformedness(false); document.setCheckingCharacters(false); - + cursor = document; - + parse(input); DomHTMLDocument h = document; @@ -139,7 +139,7 @@ public class DomHTMLParser throw new IOException("Exception: " + ex.getMessage()); } } - + /** * Create a new node. * @param name the name of node, case insensitive. @@ -165,13 +165,13 @@ public class DomHTMLParser natts.setNamedItem(attribute); } - // The default values are stored in a parent node. + // The default values are stored in a parent node. hatts = hatts.getResolveParent(); } return new_node; } - + /** * Handle comment by inserting the comment node. * @param text the comment text. @@ -181,7 +181,7 @@ public class DomHTMLParser Node c = document.createComment(new String(text)); cursor.appendChild(c); } - + /** * Handle the tag with no content. * @param tag the tag to handle. @@ -196,7 +196,7 @@ public class DomHTMLParser Node c = createNode(name); cursor.appendChild(c); } - + /** * Close the given tag. Close and reopen all nested tags. * @param tag the tag to close. @@ -229,7 +229,7 @@ public class DomHTMLParser else cursor = close.getParentNode(); - // Insert the copies of the opened nodes. + // Insert the copies of the opened nodes. Iterator iter = open.iterator(); while (iter.hasNext()) { @@ -251,7 +251,7 @@ public class DomHTMLParser cursor.appendChild(c); cursor = c; } - + /** * Handle text by inserting the text node. * @param text the text to insert. diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLPreElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLPreElement.java index 9b36a28..9a51aae 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLPreElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLPreElement.java @@ -1,4 +1,4 @@ -/* DomHTMLPreElement.java -- +/* DomHTMLPreElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLPreElement { setIntHTMLAttribute("width", width); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLQuoteElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLQuoteElement.java index 678a5ad..811aed5 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLQuoteElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLQuoteElement.java @@ -1,4 +1,4 @@ -/* DomHTMLQuoteElement.java -- +/* DomHTMLQuoteElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLQuoteElement { setHTMLAttribute("cite", cite); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLScriptElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLScriptElement.java index 8f8fff5..1bd7b34 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLScriptElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLScriptElement.java @@ -1,4 +1,4 @@ -/* DomHTMLScriptElement.java -- +/* DomHTMLScriptElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -124,6 +124,5 @@ public class DomHTMLScriptElement { setHTMLAttribute("type", type); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLSelectElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLSelectElement.java index 09752e1..fc1debb 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLSelectElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLSelectElement.java @@ -1,4 +1,4 @@ -/* DomHTMLSelectElement.java -- +/* DomHTMLSelectElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,7 +60,7 @@ public class DomHTMLSelectElement { super(owner, namespaceURI, name); } - + public String getType() { return getHTMLAttribute("type"); @@ -95,7 +95,7 @@ public class DomHTMLSelectElement option.setSelected(i == selectedIndex); } } - + public String getValue() { return getHTMLAttribute("value"); @@ -105,7 +105,7 @@ public class DomHTMLSelectElement { setHTMLAttribute("value", value); } - + public int getLength() { return getIntHTMLAttribute("length"); @@ -129,7 +129,7 @@ public class DomHTMLSelectElement ret.evaluate(); return ret; } - + public boolean getDisabled() { return getBooleanHTMLAttribute("disabled"); @@ -139,7 +139,7 @@ public class DomHTMLSelectElement { setBooleanHTMLAttribute("disabled", disabled); } - + public boolean getMultiple() { return getBooleanHTMLAttribute("multiple"); @@ -149,7 +149,7 @@ public class DomHTMLSelectElement { setBooleanHTMLAttribute("multiple", multiple); } - + public String getName() { return getHTMLAttribute("name"); @@ -159,7 +159,7 @@ public class DomHTMLSelectElement { setHTMLAttribute("name", name); } - + public int getSize() { return getIntHTMLAttribute("size"); @@ -169,7 +169,7 @@ public class DomHTMLSelectElement { setIntHTMLAttribute("size", size); } - + public int getTabIndex() { return getIntHTMLAttribute("tabindex"); @@ -206,6 +206,5 @@ public class DomHTMLSelectElement { dispatchUIEvent("focus"); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLStyleElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLStyleElement.java index f6f1fcc..78cef3b 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLStyleElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLStyleElement.java @@ -1,4 +1,4 @@ -/* DomHTMLStyleElement.java -- +/* DomHTMLStyleElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLStyleElement { setBooleanHTMLAttribute("disabled", disabled); } - + public String getMedia() { return getHTMLAttribute("media"); @@ -74,7 +74,7 @@ public class DomHTMLStyleElement { setHTMLAttribute("media", media); } - + public String getType() { return getHTMLAttribute("type"); @@ -84,6 +84,5 @@ public class DomHTMLStyleElement { setHTMLAttribute("type", type); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java index 28ea341..2133b14 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java @@ -1,4 +1,4 @@ -/* DomHTMLTableCaptionElement.java -- +/* DomHTMLTableCaptionElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -65,6 +65,5 @@ public class DomHTMLTableCaptionElement { setHTMLAttribute("align", align); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableCellElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableCellElement.java index 41d33af..350f0bf 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableCellElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableCellElement.java @@ -1,4 +1,4 @@ -/* DomHTMLTableCellElement.java -- +/* DomHTMLTableCellElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,7 +70,7 @@ public class DomHTMLTableCellElement { setHTMLAttribute("abbr", abbr); } - + public String getAlign() { return getHTMLAttribute("align"); @@ -80,7 +80,7 @@ public class DomHTMLTableCellElement { setHTMLAttribute("align", align); } - + public String getAxis() { return getHTMLAttribute("axis"); @@ -90,7 +90,7 @@ public class DomHTMLTableCellElement { setHTMLAttribute("axis", axis); } - + public String getBgColor() { return getHTMLAttribute("bgcolor"); @@ -100,7 +100,7 @@ public class DomHTMLTableCellElement { setHTMLAttribute("bgcolor", bgColor); } - + public String getCh() { return getHTMLAttribute("char"); @@ -110,7 +110,7 @@ public class DomHTMLTableCellElement { setHTMLAttribute("char", ch); } - + public String getChOff() { return getHTMLAttribute("charoff"); @@ -120,7 +120,7 @@ public class DomHTMLTableCellElement { setHTMLAttribute("charoff", chOff); } - + public int getColSpan() { return getIntHTMLAttribute("colspan"); @@ -130,7 +130,7 @@ public class DomHTMLTableCellElement { setIntHTMLAttribute("colspan", colSpan); } - + public String getHeaders() { return getHTMLAttribute("headers"); @@ -140,7 +140,7 @@ public class DomHTMLTableCellElement { setHTMLAttribute("headers", headers); } - + public String getHeight() { return getHTMLAttribute("height"); @@ -150,7 +150,7 @@ public class DomHTMLTableCellElement { setHTMLAttribute("height", height); } - + public boolean getNoWrap() { return getBooleanHTMLAttribute("nowrap"); @@ -160,7 +160,7 @@ public class DomHTMLTableCellElement { setBooleanHTMLAttribute("nowrap", noWrap); } - + public int getRowSpan() { return getIntHTMLAttribute("rowspan"); @@ -170,7 +170,7 @@ public class DomHTMLTableCellElement { setIntHTMLAttribute("rowspan", rowSpan); } - + public String getScope() { return getHTMLAttribute("scope"); @@ -180,7 +180,7 @@ public class DomHTMLTableCellElement { setHTMLAttribute("scope", scope); } - + public String getVAlign() { return getHTMLAttribute("valign"); @@ -190,7 +190,7 @@ public class DomHTMLTableCellElement { setHTMLAttribute("valign", vAlign); } - + public String getWidth() { return getHTMLAttribute("width"); @@ -200,6 +200,5 @@ public class DomHTMLTableCellElement { setHTMLAttribute("width", width); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableColElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableColElement.java index 799447d..c7cef31 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableColElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableColElement.java @@ -1,4 +1,4 @@ -/* DomHTMLTableColElement.java -- +/* DomHTMLTableColElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -65,7 +65,7 @@ public class DomHTMLTableColElement { setHTMLAttribute("align", align); } - + public String getCh() { return getHTMLAttribute("char"); @@ -75,7 +75,7 @@ public class DomHTMLTableColElement { setHTMLAttribute("char", ch); } - + public String getChOff() { return getHTMLAttribute("charoff"); @@ -85,7 +85,7 @@ public class DomHTMLTableColElement { setHTMLAttribute("charoff", chOff); } - + public int getSpan() { return getIntHTMLAttribute("span"); @@ -95,7 +95,7 @@ public class DomHTMLTableColElement { setIntHTMLAttribute("span", span); } - + public String getVAlign() { return getHTMLAttribute("valign"); @@ -105,7 +105,7 @@ public class DomHTMLTableColElement { setHTMLAttribute("valign", vAlign); } - + public String getWidth() { return getHTMLAttribute("width"); @@ -115,6 +115,5 @@ public class DomHTMLTableColElement { setHTMLAttribute("width", width); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableElement.java index ea92540..ade463e 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableElement.java @@ -1,4 +1,4 @@ -/* DomHTMLTableElement.java -- +/* DomHTMLTableElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -79,7 +79,7 @@ public class DomHTMLTableElement replaceChild(caption, ref); } } - + public HTMLTableSectionElement getTHead() { return (HTMLTableSectionElement) getChildElement("thead"); @@ -133,7 +133,7 @@ public class DomHTMLTableElement ret.evaluate(); return ret; } - + public String getAlign() { return getHTMLAttribute("align"); @@ -143,7 +143,7 @@ public class DomHTMLTableElement { setHTMLAttribute("align", align); } - + public String getBgColor() { return getHTMLAttribute("bgcolor"); @@ -153,7 +153,7 @@ public class DomHTMLTableElement { setHTMLAttribute("bgcolor", bgColor); } - + public String getBorder() { return getHTMLAttribute("border"); @@ -163,7 +163,7 @@ public class DomHTMLTableElement { setHTMLAttribute("border", border); } - + public String getCellPadding() { return getHTMLAttribute("cellpadding"); @@ -173,7 +173,7 @@ public class DomHTMLTableElement { setHTMLAttribute("cellpadding", cellPadding); } - + public String getCellSpacing() { return getHTMLAttribute("cellspacing"); @@ -183,7 +183,7 @@ public class DomHTMLTableElement { setHTMLAttribute("cellspacing", cellSpacing); } - + public String getFrame() { return getHTMLAttribute("frame"); @@ -193,7 +193,7 @@ public class DomHTMLTableElement { setHTMLAttribute("frame", frame); } - + public String getRules() { return getHTMLAttribute("rules"); @@ -203,7 +203,7 @@ public class DomHTMLTableElement { setHTMLAttribute("rules", rules); } - + public String getSummary() { return getHTMLAttribute("summary"); @@ -213,7 +213,7 @@ public class DomHTMLTableElement { setHTMLAttribute("summary", summary); } - + public String getWidth() { return getHTMLAttribute("width"); @@ -320,9 +320,9 @@ public class DomHTMLTableElement } ref.getParentNode().removeChild(ref); } - + Node getRow(final int index) - { + { int i = 0; Node thead = getChildElement("thead"); if (thead != null) @@ -395,4 +395,3 @@ public class DomHTMLTableElement } } - diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableRowElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableRowElement.java index ecd07a7..9943585 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableRowElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableRowElement.java @@ -1,4 +1,4 @@ -/* DomHTMLTableRowElement.java -- +/* DomHTMLTableRowElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -134,7 +134,7 @@ public class DomHTMLTableRowElement { setHTMLAttribute("align", align); } - + public String getBgColor() { return getHTMLAttribute("bgcolor"); @@ -144,7 +144,7 @@ public class DomHTMLTableRowElement { setHTMLAttribute("bgcolor", bgColor); } - + public String getCh() { return getHTMLAttribute("char"); @@ -154,7 +154,7 @@ public class DomHTMLTableRowElement { setHTMLAttribute("char", ch); } - + public String getChOff() { return getHTMLAttribute("charoff"); @@ -164,7 +164,7 @@ public class DomHTMLTableRowElement { setHTMLAttribute("charoff", chOff); } - + public String getVAlign() { return getHTMLAttribute("valign"); @@ -199,9 +199,9 @@ public class DomHTMLTableRowElement } removeChild(ref); } - + Node getCell(final int index) - { + { int i = 0; for (Node ctx = getFirstChild(); ctx != null; ctx = ctx.getNextSibling()) @@ -224,6 +224,5 @@ public class DomHTMLTableRowElement } return null; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableSectionElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableSectionElement.java index da015f1..389eb59 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableSectionElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTableSectionElement.java @@ -1,4 +1,4 @@ -/* DomHTMLTableSectionElement.java -- +/* DomHTMLTableSectionElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,7 +70,7 @@ public class DomHTMLTableSectionElement { setHTMLAttribute("align", align); } - + public String getCh() { return getHTMLAttribute("char"); @@ -80,7 +80,7 @@ public class DomHTMLTableSectionElement { setHTMLAttribute("char", ch); } - + public String getChOff() { return getHTMLAttribute("charoff"); @@ -90,7 +90,7 @@ public class DomHTMLTableSectionElement { setHTMLAttribute("charoff", chOff); } - + public String getVAlign() { return getHTMLAttribute("valign"); @@ -134,9 +134,9 @@ public class DomHTMLTableSectionElement } removeChild(ref); } - + Node getRow(final int index) - { + { int i = 0; for (Node ctx = getFirstChild(); ctx != null; ctx = ctx.getNextSibling()) @@ -158,6 +158,5 @@ public class DomHTMLTableSectionElement } return null; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTextAreaElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTextAreaElement.java index 22d6105..9acfab1 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTextAreaElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTextAreaElement.java @@ -1,4 +1,4 @@ -/* DomHTMLTextAreaElement.java -- +/* DomHTMLTextAreaElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -73,7 +73,7 @@ public class DomHTMLTextAreaElement { return (HTMLFormElement) getParentElement("form"); } - + public String getAccessKey() { return getHTMLAttribute("accesskey"); @@ -83,7 +83,7 @@ public class DomHTMLTextAreaElement { setHTMLAttribute("accesskey", accessKey); } - + public int getCols() { return getIntHTMLAttribute("cols"); @@ -93,7 +93,7 @@ public class DomHTMLTextAreaElement { setIntHTMLAttribute("cols", cols); } - + public boolean getDisabled() { return getBooleanHTMLAttribute("disabled"); @@ -103,7 +103,7 @@ public class DomHTMLTextAreaElement { setBooleanHTMLAttribute("disabled", disabled); } - + public String getName() { return getHTMLAttribute("name"); @@ -113,7 +113,7 @@ public class DomHTMLTextAreaElement { setHTMLAttribute("name", name); } - + public boolean getReadOnly() { return getBooleanHTMLAttribute("readOnly"); @@ -123,7 +123,7 @@ public class DomHTMLTextAreaElement { setBooleanHTMLAttribute("readonly", readOnly); } - + public int getRows() { return getIntHTMLAttribute("rows"); @@ -133,7 +133,7 @@ public class DomHTMLTextAreaElement { setIntHTMLAttribute("rows", rows); } - + public int getTabIndex() { return getIntHTMLAttribute("tabindex"); @@ -143,7 +143,7 @@ public class DomHTMLTextAreaElement { setIntHTMLAttribute("tabindex", tabIndex); } - + public String getType() { return "textarea"; @@ -172,11 +172,10 @@ public class DomHTMLTextAreaElement { dispatchUIEvent("focus"); } - + public void select() { dispatchUIEvent("select"); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTitleElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTitleElement.java index f62342d..4f58106 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLTitleElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLTitleElement.java @@ -1,4 +1,4 @@ -/* DomHTMLTitleElement.java -- +/* DomHTMLTitleElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,6 +64,5 @@ public class DomHTMLTitleElement { setTextContent(text); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/html2/DomHTMLUListElement.java b/libjava/classpath/gnu/xml/dom/html2/DomHTMLUListElement.java index c07adea..39cdce7 100644 --- a/libjava/classpath/gnu/xml/dom/html2/DomHTMLUListElement.java +++ b/libjava/classpath/gnu/xml/dom/html2/DomHTMLUListElement.java @@ -1,4 +1,4 @@ -/* DomHTMLUListElement.java -- +/* DomHTMLUListElement.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ public class DomHTMLUListElement { setBooleanHTMLAttribute("compact", compact); } - + public String getType() { return getHTMLAttribute("type"); @@ -74,6 +74,5 @@ public class DomHTMLUListElement { setHTMLAttribute("type", type); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/ls/DomLSException.java b/libjava/classpath/gnu/xml/dom/ls/DomLSException.java index 6ac49e6..31efc84 100644 --- a/libjava/classpath/gnu/xml/dom/ls/DomLSException.java +++ b/libjava/classpath/gnu/xml/dom/ls/DomLSException.java @@ -1,4 +1,4 @@ -/* DomLSException.java -- +/* DomLSException.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/dom/ls/DomLSInput.java b/libjava/classpath/gnu/xml/dom/ls/DomLSInput.java index 68705fd..39b1769 100644 --- a/libjava/classpath/gnu/xml/dom/ls/DomLSInput.java +++ b/libjava/classpath/gnu/xml/dom/ls/DomLSInput.java @@ -1,4 +1,4 @@ -/* DomLSInput.java -- +/* DomLSInput.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -155,6 +155,5 @@ public class DomLSInput { this.certifiedText = certifiedText; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/ls/DomLSOutput.java b/libjava/classpath/gnu/xml/dom/ls/DomLSOutput.java index c2f4d41..e8bec2e 100644 --- a/libjava/classpath/gnu/xml/dom/ls/DomLSOutput.java +++ b/libjava/classpath/gnu/xml/dom/ls/DomLSOutput.java @@ -1,4 +1,4 @@ -/* DomLSOutput.java -- +/* DomLSOutput.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,5 +94,5 @@ public class DomLSOutput { this.encoding = encoding; } - + } diff --git a/libjava/classpath/gnu/xml/dom/ls/DomLSParser.java b/libjava/classpath/gnu/xml/dom/ls/DomLSParser.java index f4f555e..99db79d 100644 --- a/libjava/classpath/gnu/xml/dom/ls/DomLSParser.java +++ b/libjava/classpath/gnu/xml/dom/ls/DomLSParser.java @@ -1,4 +1,4 @@ -/* DomLSParser.java -- +/* DomLSParser.java -- Copyright (C) 1999,2000,2001,2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -125,12 +125,12 @@ public class DomLSParser } // -- LSParser -- - + public DOMConfiguration getDomConfig() { return this; } - + public LSParserFilter getFilter() { return filter; @@ -283,7 +283,7 @@ public class DomLSParser catch (SAXNotRecognizedException e) { // ignore - } + } try { reader.setFeature("http://xml.org/sax/features/use-attributes2", @@ -563,6 +563,5 @@ public class DomLSParser } abort(); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/ls/DomLSSerializer.java b/libjava/classpath/gnu/xml/dom/ls/DomLSSerializer.java index cedaf15..c282b0b 100644 --- a/libjava/classpath/gnu/xml/dom/ls/DomLSSerializer.java +++ b/libjava/classpath/gnu/xml/dom/ls/DomLSSerializer.java @@ -1,4 +1,4 @@ -/* DomLSSerializer.java -- +/* DomLSSerializer.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -85,7 +85,7 @@ public class DomLSSerializer } // -- LSSerializer -- - + public DOMConfiguration getDomConfig() { return this; @@ -349,6 +349,5 @@ public class DomLSSerializer { return SUPPORTED_PARAMETERS.contains(str); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/ls/FilteredSAXEventSink.java b/libjava/classpath/gnu/xml/dom/ls/FilteredSAXEventSink.java index 1c99ee5..65c1d37 100644 --- a/libjava/classpath/gnu/xml/dom/ls/FilteredSAXEventSink.java +++ b/libjava/classpath/gnu/xml/dom/ls/FilteredSAXEventSink.java @@ -1,4 +1,4 @@ -/* FilteredSAXEventSink.java -- +/* FilteredSAXEventSink.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ class FilteredSAXEventSink * Stack of elements to insert. */ LinkedList nodes; - + /** * Corresponding stack of filter decisions about the nodes. */ @@ -90,7 +90,7 @@ class FilteredSAXEventSink } nodes = new LinkedList(); decisions = new LinkedList(); - + super.startDocument(); } @@ -110,7 +110,7 @@ class FilteredSAXEventSink doc = null; break; } - + nodes = null; decisions = null; } @@ -125,7 +125,7 @@ class FilteredSAXEventSink } Element element = createElement(uri, localName, qName, atts); ctx = element; - + short decision = getDecision(element, true); nodes.addLast(element); decisions.addLast(new Short(decision)); @@ -164,7 +164,7 @@ class FilteredSAXEventSink return; } super.endElement(uri, localName, qName); - + Element element = (Element) nodes.removeLast(); Node parent = nodes.isEmpty() ? doc : (Node) nodes.getLast(); ctx = parent; @@ -303,40 +303,40 @@ class FilteredSAXEventSink { case Node.ATTRIBUTE_NODE: show = ((whatToShow & NodeFilter.SHOW_ATTRIBUTE) != 0); - break; + break; case Node.TEXT_NODE: show = ((whatToShow & NodeFilter.SHOW_TEXT) != 0); - break; + break; case Node.CDATA_SECTION_NODE: show = ((whatToShow & NodeFilter.SHOW_CDATA_SECTION) != 0); - break; + break; case Node.ELEMENT_NODE: show = ((whatToShow & NodeFilter.SHOW_ELEMENT) != 0); - break; + break; case Node.COMMENT_NODE: show = ((whatToShow & NodeFilter.SHOW_COMMENT) != 0); - break; + break; case Node.DOCUMENT_NODE: show = ((whatToShow & NodeFilter.SHOW_DOCUMENT) != 0); - break; + break; case Node.PROCESSING_INSTRUCTION_NODE: show = ((whatToShow & NodeFilter.SHOW_PROCESSING_INSTRUCTION) != 0); - break; + break; case Node.DOCUMENT_FRAGMENT_NODE: show = ((whatToShow & NodeFilter.SHOW_DOCUMENT_FRAGMENT) != 0); - break; + break; case Node.DOCUMENT_TYPE_NODE: show = ((whatToShow & NodeFilter.SHOW_DOCUMENT_TYPE) != 0); - break; + break; case Node.ENTITY_REFERENCE_NODE: show = ((whatToShow & NodeFilter.SHOW_ENTITY_REFERENCE) != 0); - break; + break; case Node.ENTITY_NODE: show = ((whatToShow & NodeFilter.SHOW_ENTITY) != 0); - break; + break; case Node.NOTATION_NODE: show = ((whatToShow & NodeFilter.SHOW_NOTATION) != 0); - break; + break; } } if (!show) @@ -351,4 +351,3 @@ class FilteredSAXEventSink } } - diff --git a/libjava/classpath/gnu/xml/dom/ls/ReaderInputStream.java b/libjava/classpath/gnu/xml/dom/ls/ReaderInputStream.java index 5b41abd..cf279ab 100644 --- a/libjava/classpath/gnu/xml/dom/ls/ReaderInputStream.java +++ b/libjava/classpath/gnu/xml/dom/ls/ReaderInputStream.java @@ -1,4 +1,4 @@ -/* ReaderInputStream.java -- +/* ReaderInputStream.java -- Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -124,7 +124,7 @@ public class ReaderInputStream String s = new String(c, 0, l); byte[] d = s.getBytes(encoding); - + int available = d.length; int more = d.length - len; if (more > 0) @@ -134,7 +134,7 @@ public class ReaderInputStream System.arraycopy(d, len, extra, 0, more); available -= more; } - + System.arraycopy(d, 0, b, off, available); return available; } @@ -232,6 +232,5 @@ public class ReaderInputStream { return getClass().getName() + "[" + reader + ", " + encoding + "]"; } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java b/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java index 1f8de046..06333dd 100644 --- a/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java +++ b/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java @@ -1,4 +1,4 @@ -/* SAXEventSink.java -- +/* SAXEventSink.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -96,7 +96,7 @@ public class SAXEventSink boolean coalescing; XMLReader reader; // reference back to the parser to get features - + DomDocument doc; // document being constructed Node ctx; // current context (parent node) LinkedList entityCtx; // entity context @@ -122,7 +122,7 @@ public class SAXEventSink } // -- ContentHandler2 -- - + public void setDocumentLocator(Locator locator) { this.locator = locator; @@ -378,7 +378,7 @@ public class SAXEventSink } // -- LexicalHandler -- - + public void startDTD(String name, String publicId, String systemId) throws SAXException { @@ -534,7 +534,7 @@ public class SAXEventSink } // -- DeclHandler -- - + public void elementDecl(String name, String model) throws SAXException { @@ -599,6 +599,5 @@ public class SAXEventSink DomDoctype doctype = (DomDoctype) ctx; Entity entity = doctype.declareEntity(name, publicId, systemId, null); } - -} +} diff --git a/libjava/classpath/gnu/xml/dom/ls/WriterOutputStream.java b/libjava/classpath/gnu/xml/dom/ls/WriterOutputStream.java index 2fb2061..f1ae344 100644 --- a/libjava/classpath/gnu/xml/dom/ls/WriterOutputStream.java +++ b/libjava/classpath/gnu/xml/dom/ls/WriterOutputStream.java @@ -1,4 +1,4 @@ -/* WriterOutputStream.java -- +/* WriterOutputStream.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -93,6 +93,5 @@ public class WriterOutputStream { writer.flush(); } - -} +} diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeAttr.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeAttr.java index 144aaf8..da9c62c 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeAttr.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeAttr.java @@ -1,4 +1,4 @@ -/* GnomeAttr.java - +/* GnomeAttr.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -59,31 +59,31 @@ class GnomeAttr { super(id); } - + public String getName() { return getNodeName(); } - + public native boolean getSpecified(); - + public native String getValue(); - + public native void setValue(String value) throws DOMException; - + public Node getParentNode() { return null; } - + public Element getOwnerElement() { return (Element) super.getParentNode(); } - + // DOM Level 3 methods - + public TypeInfo getSchemaTypeInfo() { return new GnomeTypeInfo(id); @@ -100,7 +100,7 @@ class GnomeAttr element.userIdAttrs != null && element.userIdAttrs.contains(this)); } - + private native boolean xmljIsId(); public String toString() @@ -113,6 +113,5 @@ class GnomeAttr buffer.append("]"); return buffer.toString(); } - -} +} diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCDATASection.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCDATASection.java index 8fb89ff..3e408e6 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCDATASection.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCDATASection.java @@ -1,4 +1,4 @@ -/* GnomeCDATASection.java - +/* GnomeCDATASection.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCharacterData.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCharacterData.java index aa98652..3f3d6ec 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCharacterData.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCharacterData.java @@ -1,4 +1,4 @@ -/* GnomeCharacterData.java - +/* GnomeCharacterData.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeComment.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeComment.java index a0cad5b..b6985c4 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeComment.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeComment.java @@ -1,4 +1,4 @@ -/* GnomeComment.java - +/* GnomeComment.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDOMException.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDOMException.java index eae0787..a1af823 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDOMException.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDOMException.java @@ -1,4 +1,4 @@ -/* GnomeDOMException.java - +/* GnomeDOMException.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,5 +94,5 @@ class GnomeDOMException return null; } } - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDOMStringList.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDOMStringList.java index 3456acd..c415ec7 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDOMStringList.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDOMStringList.java @@ -1,4 +1,4 @@ -/* GnomeDOMStringList.java - +/* GnomeDOMStringList.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -80,5 +80,5 @@ class GnomeDOMStringList } return false; } - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocument.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocument.java index a533355..0d1b487 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocument.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocument.java @@ -1,4 +1,4 @@ -/* GnomeDocument.java - +/* GnomeDocument.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -102,18 +102,18 @@ public class GnomeDocument boolean validate = false; boolean validateIfSchema = false; boolean wellFormed = true; - + GnomeDocument(Object id) { super(id); strictErrorChecking = true; } - + protected void finalize() { free(id); } - + private native void free(Object id); public native DocumentType getDoctype(); @@ -177,7 +177,7 @@ public class GnomeDocument public native Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException; - + public native Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException; @@ -211,7 +211,7 @@ public class GnomeDocument } return element; } - + private native Element xmljGetElementById(String elementId); // DOM Level 3 methods @@ -237,7 +237,7 @@ public class GnomeDocument { this.strictErrorChecking = strictErrorChecking; } - + public native String getDocumentURI(); public native void setDocumentURI(String documentURI); @@ -410,14 +410,14 @@ public class GnomeDocument else if ("infoset".equals(name)) { return Boolean.valueOf(!validateIfSchema && - !entities && - !datatypeNormalization && - !cdataSections && - namespaceDeclarations && - wellFormed && - elementContentWhitespace && - comments && - namespaces); + !entities && + !datatypeNormalization && + !cdataSections && + namespaceDeclarations && + wellFormed && + elementContentWhitespace && + comments && + namespaces); } else if ("namespaces".equals(name)) { @@ -466,7 +466,7 @@ public class GnomeDocument "namespace-declarations".equals(name) || "split-cdata-sections".equals(name)); } - + public DOMStringList getParameterNames() { String[] names = new String[] { @@ -547,7 +547,7 @@ public class GnomeDocument } // -- Debugging -- - + public String toString() { CPStringBuilder buffer = new CPStringBuilder(getClass().getName()); diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java index 4decee0..6dea872 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java @@ -1,4 +1,4 @@ -/* GnomeDocumentBuilder.java - +/* GnomeDocumentBuilder.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -89,7 +89,7 @@ public class GnomeDocumentBuilder { this(true, false, false); } - + /** * Constructs a new document builder. * @param validate whether to validate during parsing @@ -151,7 +151,7 @@ public class GnomeDocumentBuilder true, //entityResolver != null, errorHandler != null); } - + private native Document parseStream(InputStream in, byte[] detectBuffer, String publicId, @@ -162,7 +162,7 @@ public class GnomeDocumentBuilder boolean expandEntities, boolean entityResolver, boolean errorHandler); - + public void setEntityResolver(EntityResolver resolver) { entityResolver = resolver; @@ -186,7 +186,7 @@ public class GnomeDocumentBuilder { name = name.substring(1); } - + if ("xml".equals(name) || "core".equals(name)) { return (version == null || @@ -194,7 +194,7 @@ public class GnomeDocumentBuilder "1.0".equals(version) || "2.0".equals(version) || "3.0".equals(version)); - + } else if ("ls".equals(name) || "ls-async".equals(name)) { @@ -210,7 +210,7 @@ public class GnomeDocumentBuilder { return (version == null || "".equals(version) || - "2.0".equals(version)); + "2.0".equals(version)); } else if ("xpath".equals(name)) { @@ -220,7 +220,7 @@ public class GnomeDocumentBuilder } return false; } - + // DOM Level 3 public Object getFeature(String feature, String version) @@ -231,25 +231,25 @@ public class GnomeDocumentBuilder } return null; } - + public native Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype); - + public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) { return new StandaloneDocumentType(qualifiedName, publicId, systemId); } - + // Callback hooks from JNI - + private void setDocumentLocator(Object ctx, Object loc) { // ignore } - + private InputStream resolveEntity(String publicId, String systemId, String base) throws SAXException, IOException @@ -270,7 +270,7 @@ public class GnomeDocumentBuilder } return in; } - + private void warning(String message, int lineNumber, int columnNumber, diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java index c8918aa..448e123 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java @@ -1,4 +1,4 @@ -/* GnomeDocumentBuilderFactory.java - +/* GnomeDocumentBuilderFactory.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -93,7 +93,7 @@ public class GnomeDocumentBuilderFactory { // TODO } - + public void setFeature(String name, boolean value) throws ParserConfigurationException { @@ -114,5 +114,5 @@ public class GnomeDocumentBuilderFactory return secureProcessing; throw new ParserConfigurationException(name); } - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java index e5b355e..3623eb6 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java @@ -1,4 +1,4 @@ -/* GnomeDocumentFragment.java - +/* GnomeDocumentFragment.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentType.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentType.java index eb3a65f..7649b73 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentType.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentType.java @@ -1,4 +1,4 @@ -/* GnomeDocumentType.java - +/* GnomeDocumentType.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -56,7 +56,7 @@ implements DocumentType { super (id); } - + public String getName () { return getNodeName (); diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeElement.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeElement.java index e87e3ad..19889d6 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeElement.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeElement.java @@ -1,4 +1,4 @@ -/* GnomeElement.java - +/* GnomeElement.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -67,7 +67,7 @@ class GnomeElement { super(id); } - + public String getTagName() { return getNodeName(); @@ -77,7 +77,7 @@ class GnomeElement public native void setAttribute(String name, String value) throws DOMException; - + public void removeAttribute(String name) throws DOMException { @@ -89,7 +89,7 @@ class GnomeElement } public native Attr getAttributeNode(String name); - + public native Attr setAttributeNode(Attr newAttr) throws DOMException; @@ -97,9 +97,9 @@ class GnomeElement throws DOMException; public native NodeList getElementsByTagName(String name); - + public native String getAttributeNS(String namespaceURI, String localName); - + public native void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException; @@ -113,7 +113,7 @@ class GnomeElement removeAttributeNode(attr); } } - + public native Attr getAttributeNodeNS(String namespaceURI, String localName); @@ -122,7 +122,7 @@ class GnomeElement public native NodeList getElementsByTagNameNS(String namespaceURI, String localName); - + public native boolean hasAttribute(String name); public native boolean hasAttributeNS(String namespaceURI, diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntity.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntity.java index 8d61a26..a052174 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntity.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntity.java @@ -1,4 +1,4 @@ -/* GnomeEntity.java - +/* GnomeEntity.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -63,25 +63,25 @@ implements Entity public native String getNotationName (); // DOM Level 3 methods - + public String getInputEncoding () { // TODO - return null; + return null; } - + public String getXmlEncoding () { // TODO return null; } - + public String getXmlVersion () { // TODO return null; } - + public String toString () { String publicId = getPublicId (); diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntityReference.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntityReference.java index 136b3a6..aa2fcf1 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntityReference.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntityReference.java @@ -1,4 +1,4 @@ -/* GnomeEntityReference.java - +/* GnomeEntityReference.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java index 8ca8921..b8df4fe 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java @@ -1,4 +1,4 @@ -/* GnomeNamedNodeMap.java - +/* GnomeNamedNodeMap.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -78,7 +78,7 @@ implements NamedNodeMap throws DOMException; public native Node item (int index); - + public native int getLength (); public native Node getNamedItemNS (String namespaceURI, String localName); @@ -88,5 +88,5 @@ implements NamedNodeMap public native Node removeNamedItemNS (String namespaceURI, String localName); - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNode.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNode.java index 6f574ec..5874916 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNode.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNode.java @@ -1,4 +1,4 @@ -/* GnomeNode.java - +/* GnomeNode.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -145,7 +145,7 @@ class GnomeNode docNodes.put(node, nodeInstance); return nodeInstance; } - + /** * Frees the specified document. * This removes all its nodes from the cache. @@ -159,7 +159,7 @@ class GnomeNode instances.remove(doc); //System.out.println("Freed "+instances.remove(doc)); } - + /** * xmlNodePtr */ @@ -302,7 +302,7 @@ class GnomeNode notifyUserDataHandlers(UserDataHandler.NODE_CLONED, this, ret); return ret; } - + private native Node xmljCloneNode(boolean deep); public native void normalize(); @@ -359,7 +359,7 @@ class GnomeNode } private native int xmljCompareTo(Object other); - + public String getTextContent() throws DOMException { @@ -392,7 +392,7 @@ class GnomeNode return null; } } - + public void setTextContent(String textContent) throws DOMException { @@ -427,20 +427,20 @@ class GnomeNode break; } } - + public boolean isSameNode(Node other) { return equals(other); } - + public native String lookupPrefix(String namespaceURI); - + public native boolean isDefaultNamespace(String namespaceURI); - + public native String lookupNamespaceURI(String prefix); - + public native boolean isEqualNode(Node arg); - + public Object getFeature(String feature, String version) { return getOwnerDocument().getImplementation() diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNodeList.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNodeList.java index efd07ac..51a6d0b 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNodeList.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNodeList.java @@ -1,4 +1,4 @@ -/* GnomeNodeList.java - +/* GnomeNodeList.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -62,5 +62,5 @@ implements NodeList public native Node item (int index); public native int getLength (); - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNotation.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNotation.java index 7f6fdf44..50e48e2 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNotation.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNotation.java @@ -1,4 +1,4 @@ -/* GnomeNotation.java - +/* GnomeNotation.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java index d2ecd18..fad6e10 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java @@ -1,4 +1,4 @@ -/* GnomeProcessingInstruction.java - +/* GnomeProcessingInstruction.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeText.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeText.java index 8b8e5e0..e00be18 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeText.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeText.java @@ -1,4 +1,4 @@ -/* GnomeText.java - +/* GnomeText.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -57,7 +57,7 @@ implements Text { super (id); } - + public Text splitText (int offset) throws DOMException { @@ -69,14 +69,14 @@ implements Text setNodeValue (part2); return text; } - + // DOM Level 3 public boolean isElementContentWhitespace () { return getTextContent ().trim ().length () == 0; } - + public String getWholeText () { Node first = this; @@ -103,7 +103,7 @@ implements Text { setNodeValue (content); } - + Node first = this; Node node = getPreviousSibling (); while (node != null && node instanceof Text) diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeTypeInfo.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeTypeInfo.java index d365f0d..5517e8a 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeTypeInfo.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeTypeInfo.java @@ -1,4 +1,4 @@ -/* GnomeTypeInfo.java - +/* GnomeTypeInfo.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -61,5 +61,5 @@ class GnomeTypeInfo implements TypeInfo public native boolean isDerivedFrom (String typeNamespaceArg, String typeNameArg, int derivationMethod); - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathExpression.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathExpression.java index 8158047..52f4daa 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathExpression.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathExpression.java @@ -1,4 +1,4 @@ -/* GnomeXPathExpression.java - +/* GnomeXPathExpression.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -78,9 +78,9 @@ implements XPathExpression { return doEvaluate (expr, contextNode, type, result); } - + private native Object doEvaluate (Object expr, Node contextNode, short type, Object result) throws XPathException, DOMException; - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java index a9ba855..039a79a 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java @@ -1,4 +1,4 @@ -/* GnomeXPathNSResolver.java - +/* GnomeXPathNSResolver.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,6 +60,5 @@ class GnomeXPathNSResolver { return node.lookupNamespaceURI(prefix); } - -} +} diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java index dde3be2..b8d0a3d0 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java @@ -1,4 +1,4 @@ -/* GnomeXPathNodeList.java - +/* GnomeXPathNodeList.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathResult.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathResult.java index 850b5fa..b2c706f 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathResult.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathResult.java @@ -1,4 +1,4 @@ -/* GnomeXPathResult.java - +/* GnomeXPathResult.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -69,7 +69,7 @@ implements XPathResult } private native void free (Object obj); - + public native short getResultType (); public native double getNumberValue () @@ -130,5 +130,5 @@ implements XPathResult getSnapshotLength () + ']'; } } - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/sax/GnomeLocator.java b/libjava/classpath/gnu/xml/libxmlj/sax/GnomeLocator.java index 0c812f6..dba0a72 100644 --- a/libjava/classpath/gnu/xml/libxmlj/sax/GnomeLocator.java +++ b/libjava/classpath/gnu/xml/libxmlj/sax/GnomeLocator.java @@ -1,4 +1,4 @@ -/* GnomeLocator.java - +/* GnomeLocator.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -67,7 +67,7 @@ implements Locator throw new NullPointerException ("loc"); } } - + public String getPublicId () { return publicId (ctx, loc); @@ -86,14 +86,14 @@ implements Locator { return lineNumber (ctx, loc); } - + private native int lineNumber (Object ctx, Object loc); public int getColumnNumber () { return columnNumber (ctx, loc); } - + private native int columnNumber (Object ctx, Object loc); } diff --git a/libjava/classpath/gnu/xml/libxmlj/sax/GnomeSAXParser.java b/libjava/classpath/gnu/xml/libxmlj/sax/GnomeSAXParser.java index a5cdc42..86d326b 100644 --- a/libjava/classpath/gnu/xml/libxmlj/sax/GnomeSAXParser.java +++ b/libjava/classpath/gnu/xml/libxmlj/sax/GnomeSAXParser.java @@ -1,4 +1,4 @@ -/* GnomeSAXParser.java - +/* GnomeSAXParser.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -101,5 +101,5 @@ extends SAXParser { return validating; } - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java b/libjava/classpath/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java index 5152d54..0c28812 100644 --- a/libjava/classpath/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java +++ b/libjava/classpath/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java @@ -1,4 +1,4 @@ -/* GnomeSAXParserFactory.java - +/* GnomeSAXParserFactory.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -88,5 +88,5 @@ extends SAXParserFactory GnomeXMLReader.checkFeatureName (name); features.put (name, flag ? Boolean.TRUE : Boolean.FALSE); } - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/sax/GnomeXMLReader.java b/libjava/classpath/gnu/xml/libxmlj/sax/GnomeXMLReader.java index 846015a..3a34bc9 100644 --- a/libjava/classpath/gnu/xml/libxmlj/sax/GnomeXMLReader.java +++ b/libjava/classpath/gnu/xml/libxmlj/sax/GnomeXMLReader.java @@ -1,4 +1,4 @@ -/* GnomeXMLReader.java - +/* GnomeXMLReader.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -83,7 +83,7 @@ implements XMLReader private static final String FEATURES_PREFIX = "http://xml.org/sax/features/"; - + private static final List RECOGNIZED_FEATURES = Arrays.asList (new String[] { @@ -100,10 +100,10 @@ implements XMLReader "use-entity-resolver2", "validation" }); - + private static final String PROPERTIES_PREFIX = "http://xml.org/sax/properties/"; - + private static final List RECOGNIZED_PROPERTIES = Arrays.asList (new String[] { @@ -671,7 +671,7 @@ implements XMLReader { } } - + private void startDocument (boolean standalone) throws SAXException { diff --git a/libjava/classpath/gnu/xml/libxmlj/sax/Namespaces.java b/libjava/classpath/gnu/xml/libxmlj/sax/Namespaces.java index 646d7b4..473d020 100644 --- a/libjava/classpath/gnu/xml/libxmlj/sax/Namespaces.java +++ b/libjava/classpath/gnu/xml/libxmlj/sax/Namespaces.java @@ -1,4 +1,4 @@ -/* Namespaces.java - +/* Namespaces.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -44,14 +44,14 @@ import java.util.Iterator; /** * Helper class for managing namespaces. - * + * * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ class Namespaces { ArrayList stack = new ArrayList (); - + /** * Increments the tree depth. * This allocates a new potential namespace entry. diff --git a/libjava/classpath/gnu/xml/libxmlj/sax/StringArrayAttributes.java b/libjava/classpath/gnu/xml/libxmlj/sax/StringArrayAttributes.java index f534efb..f5a753c 100644 --- a/libjava/classpath/gnu/xml/libxmlj/sax/StringArrayAttributes.java +++ b/libjava/classpath/gnu/xml/libxmlj/sax/StringArrayAttributes.java @@ -1,4 +1,4 @@ -/* StringArrayAttributes.java - +/* StringArrayAttributes.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -168,4 +168,3 @@ implements Attributes } } - diff --git a/libjava/classpath/gnu/xml/libxmlj/sax/XMLName.java b/libjava/classpath/gnu/xml/libxmlj/sax/XMLName.java index 5950a79..b9bdf91 100644 --- a/libjava/classpath/gnu/xml/libxmlj/sax/XMLName.java +++ b/libjava/classpath/gnu/xml/libxmlj/sax/XMLName.java @@ -1,4 +1,4 @@ -/* XMLName.java - +/* XMLName.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -46,7 +46,7 @@ class XMLName { private static final String XML_URI = "http://www.w3.org/XML/1998/namespace"; - + final String uri; final String localName; final String qName; diff --git a/libjava/classpath/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java b/libjava/classpath/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java index 0601e5e..398a0ba 100644 --- a/libjava/classpath/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java +++ b/libjava/classpath/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java @@ -1,4 +1,4 @@ -/* ErrorListenerErrorHandler.java - +/* ErrorListenerErrorHandler.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -71,7 +71,7 @@ implements ErrorHandler throw getSAXException (te); } } - + public void error (SAXParseException e) throws SAXException { @@ -84,7 +84,7 @@ implements ErrorHandler throw getSAXException (te); } } - + public void fatalError (SAXParseException e) throws SAXException { @@ -107,5 +107,5 @@ implements ErrorHandler } return new SAXException (e); } - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/transform/GnomeTransformer.java b/libjava/classpath/gnu/xml/libxmlj/transform/GnomeTransformer.java index 37aa05b..5f31cb8 100755 --- a/libjava/classpath/gnu/xml/libxmlj/transform/GnomeTransformer.java +++ b/libjava/classpath/gnu/xml/libxmlj/transform/GnomeTransformer.java @@ -1,4 +1,4 @@ -/* GnomeTransformer.java - +/* GnomeTransformer.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -120,19 +120,19 @@ public class GnomeTransformer * @param errorListener the error listener for transformation errors */ GnomeTransformer (Source source, - URIResolver resolver, - ErrorListener errorListener) + URIResolver resolver, + ErrorListener errorListener) throws TransformerConfigurationException { this.resolver = resolver; this.errorListener = errorListener; parameters = new HashMap (); outputProperties = new Properties (); - + if (source == null) { stylesheet = newStylesheet (); - } + } else if (source instanceof StreamSource) { try @@ -176,12 +176,12 @@ public class GnomeTransformer throw new TransformerConfigurationException (msg); } } - + /** * Copy constructor. */ private GnomeTransformer (Object stylesheet, - URIResolver resolver, + URIResolver resolver, ErrorListener errorListener, Map parameters, Properties outputProperties) @@ -215,7 +215,7 @@ public class GnomeTransformer public synchronized void setParameter (String parameter, Object value) { parameters.put (parameter, value); - } + } public synchronized Object getParameter (String name) { @@ -232,7 +232,7 @@ public class GnomeTransformer public void setErrorListener (ErrorListener listener) { this.errorListener = listener; - } + } public ErrorListener getErrorListener () { @@ -244,7 +244,7 @@ public class GnomeTransformer public void setURIResolver (URIResolver resolver) { this.resolver = resolver; - } + } public URIResolver getURIResolver () { @@ -259,12 +259,12 @@ public class GnomeTransformer { // Note: defensive copying this.outputProperties = new Properties (outputProperties); - } + } public void setOutputProperty (String name, String value) { outputProperties.setProperty (name, value); - } + } public Properties getOutputProperties () { @@ -510,7 +510,7 @@ public class GnomeTransformer throw new TransformerException (e); } } - + private void setDocumentLocator (Object ctx, Object loc) { } @@ -550,7 +550,7 @@ public class GnomeTransformer systemId); errorListener.error (new TransformerException (message, l)); } - + private void fatalError (String message, int lineNumber, int columnNumber, @@ -568,5 +568,5 @@ public class GnomeTransformer systemId); errorListener.fatalError (new TransformerException (message, l)); } - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java b/libjava/classpath/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java index 78dfe21..4a0100a 100755 --- a/libjava/classpath/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java +++ b/libjava/classpath/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java @@ -1,4 +1,4 @@ -/* GnomeTransformerFactory.java - +/* GnomeTransformerFactory.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -86,7 +86,7 @@ public class GnomeTransformerFactory { XMLJ.init (); } - + /** * URIResolver set by user, or default implementation. */ @@ -104,7 +104,7 @@ public class GnomeTransformerFactory //--- Implementation of javax.xml.transform.TransformerFactory //--- follows. - + // -- begin getAssociatedStylesheet implementation -- /** @@ -112,7 +112,7 @@ public class GnomeTransformerFactory * <code>null</code> if no associated stylesheet could be found. */ public Source getAssociatedStylesheet(Source source, String media, - String title, String charset) + String title, String charset) throws TransformerConfigurationException { String href= null; @@ -225,7 +225,7 @@ public class GnomeTransformerFactory class AssociatedStylesheetHandler extends DefaultHandler { - + String media; String title; String href; @@ -246,7 +246,7 @@ public class GnomeTransformerFactory href = parseParameter(data, "href"); } } - + } String parseParameter(String data, String name) @@ -270,33 +270,33 @@ public class GnomeTransformerFactory public synchronized void setAttribute (String name, Object value) { this.attributes.put (name, value); - } + } public synchronized Object getAttribute (String name) { return attributes.get (name); } - + public void setErrorListener (ErrorListener errorListener) { this.errorListener = errorListener; - } + } public ErrorListener getErrorListener () { return errorListener; } - + public void setURIResolver (URIResolver uriResolver) { this.uriResolver = uriResolver; - } + } public URIResolver getURIResolver () { return uriResolver; } - + public boolean getFeature (String name) { return (StreamSource.FEATURE.equals (name) || @@ -335,7 +335,7 @@ public class GnomeTransformerFactory * Returns a new instance of class {@link Templates} for * the given souce. */ - public Templates newTemplates (Source source) + public Templates newTemplates (Source source) throws TransformerConfigurationException { return new GnomeTransformer (source, uriResolver, errorListener); diff --git a/libjava/classpath/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java b/libjava/classpath/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java index 88a58e1..0ce71d0 100644 --- a/libjava/classpath/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java +++ b/libjava/classpath/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java @@ -1,4 +1,4 @@ -/* URIResolverEntityResolver.java - +/* URIResolverEntityResolver.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/libxmlj/util/EmptyNodeList.java b/libjava/classpath/gnu/xml/libxmlj/util/EmptyNodeList.java index 24a0822..60019dd 100644 --- a/libjava/classpath/gnu/xml/libxmlj/util/EmptyNodeList.java +++ b/libjava/classpath/gnu/xml/libxmlj/util/EmptyNodeList.java @@ -1,4 +1,4 @@ -/* EmptyNodeList.java - +/* EmptyNodeList.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -58,5 +58,5 @@ implements NodeList { return 0; } - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/util/NamedInputStream.java b/libjava/classpath/gnu/xml/libxmlj/util/NamedInputStream.java index 8d20ec4..01b3af9 100644 --- a/libjava/classpath/gnu/xml/libxmlj/util/NamedInputStream.java +++ b/libjava/classpath/gnu/xml/libxmlj/util/NamedInputStream.java @@ -1,4 +1,4 @@ -/* NamedInputStream.java - +/* NamedInputStream.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,7 +54,7 @@ extends FilterInputStream { private static int DETECT_BUFFER_SIZE = 50; - + private String name; NamedInputStream (String name, InputStream in, int size) @@ -95,5 +95,5 @@ extends FilterInputStream return ret; } } - + } diff --git a/libjava/classpath/gnu/xml/libxmlj/util/StandaloneDocumentType.java b/libjava/classpath/gnu/xml/libxmlj/util/StandaloneDocumentType.java index d47cdb0..5c33166 100644 --- a/libjava/classpath/gnu/xml/libxmlj/util/StandaloneDocumentType.java +++ b/libjava/classpath/gnu/xml/libxmlj/util/StandaloneDocumentType.java @@ -1,4 +1,4 @@ -/* StandaloneDocumentType.java - +/* StandaloneDocumentType.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -75,7 +75,7 @@ implements DocumentType // TODO return null; } - + public NamedNodeMap getNotations () { // TODO @@ -96,7 +96,7 @@ implements DocumentType { return null; } - + // -- Node -- public String getNodeName () @@ -109,7 +109,7 @@ implements DocumentType { return null; } - + public void setNodeValue (String nodeValue) throws DOMException { @@ -254,12 +254,12 @@ implements DocumentType { return equals (other); } - + public String lookupPrefix (String namespace) { return null; } - + public boolean isDefaultNamespace (String namespace) { return false; diff --git a/libjava/classpath/gnu/xml/libxmlj/util/StandaloneLocator.java b/libjava/classpath/gnu/xml/libxmlj/util/StandaloneLocator.java index 5430330..75b40bd 100644 --- a/libjava/classpath/gnu/xml/libxmlj/util/StandaloneLocator.java +++ b/libjava/classpath/gnu/xml/libxmlj/util/StandaloneLocator.java @@ -1,4 +1,4 @@ -/* StandaloneLocator.java - +/* StandaloneLocator.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -65,12 +65,12 @@ implements Locator, SourceLocator this.publicId = publicId; this.systemId = systemId; } - + public String getPublicId () { return publicId; } - + public String getSystemId () { return systemId; diff --git a/libjava/classpath/gnu/xml/libxmlj/util/XMLJ.java b/libjava/classpath/gnu/xml/libxmlj/util/XMLJ.java index 0d5f9f6..8d954d0 100644 --- a/libjava/classpath/gnu/xml/libxmlj/util/XMLJ.java +++ b/libjava/classpath/gnu/xml/libxmlj/util/XMLJ.java @@ -1,4 +1,4 @@ -/* XMLJ.java - +/* XMLJ.java - Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,35 +70,35 @@ public final class XMLJ static class XMLJShutdownHook implements Runnable { - + public void run () { // Make sure finalizers are run System.gc (); Runtime.getRuntime ().runFinalization (); - + // Perform global cleanup on the native level GnomeTransformerFactory.freeLibxsltGlobal (); } - + } private static boolean initialised = false; - + public static void init () { if (!initialised) { System.loadLibrary ("xmlj"); - - XMLJShutdownHook hook = new XMLJShutdownHook (); + + XMLJShutdownHook hook = new XMLJShutdownHook (); Runtime.getRuntime ().addShutdownHook (new Thread (hook)); } initialised = true; } private static final int LOOKAHEAD = 50; - + /** * Returns an input stream for the specified input source. * This returns a pushback stream that libxmlj can use to detect the @@ -276,5 +276,5 @@ public final class XMLJ } return uri; } - + } diff --git a/libjava/classpath/gnu/xml/pipeline/CallFilter.java b/libjava/classpath/gnu/xml/pipeline/CallFilter.java index 3b33751..2398b86 100644 --- a/libjava/classpath/gnu/xml/pipeline/CallFilter.java +++ b/libjava/classpath/gnu/xml/pipeline/CallFilter.java @@ -1,4 +1,4 @@ -/* CallFilter.java -- +/* CallFilter.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -99,11 +99,11 @@ import gnu.xml.util.XMLWriter; */ final public class CallFilter implements EventConsumer { - private Requestor req; - private EventConsumer next; - private URL target; - private URLConnection conn; - private ErrorHandler errHandler; + private Requestor req; + private EventConsumer next; + private URL target; + private URLConnection conn; + private ErrorHandler errHandler; /** @@ -113,13 +113,13 @@ final public class CallFilter implements EventConsumer * * @exception IOException if the URI isn't accepted as a URL */ - // constructor used by PipelineFactory + // constructor used by PipelineFactory public CallFilter (String uri, EventConsumer next) throws IOException { - this.next = next; - req = new Requestor (); - setCallTarget (uri); + this.next = next; + req = new Requestor (); + setCallTarget (uri); } /** @@ -129,7 +129,7 @@ final public class CallFilter implements EventConsumer final public void setCallTarget (String uri) throws IOException { - target = new URL (uri); + target = new URL (uri); } /** @@ -138,7 +138,7 @@ final public class CallFilter implements EventConsumer */ public void setErrorHandler (ErrorHandler handler) { - req.setErrorHandler (handler); + req.setErrorHandler (handler); } @@ -147,19 +147,19 @@ final public class CallFilter implements EventConsumer */ final public String getCallTarget () { - return target.toString (); + return target.toString (); } /** Returns the content handler currently in use. */ final public org.xml.sax.ContentHandler getContentHandler () { - return req; + return req; } /** Returns the DTD handler currently in use. */ final public DTDHandler getDTDHandler () { - return req; + return req; } @@ -170,11 +170,11 @@ final public class CallFilter implements EventConsumer final public Object getProperty (String id) throws SAXNotRecognizedException { - if (EventFilter.DECL_HANDLER.equals (id)) - return req; - if (EventFilter.LEXICAL_HANDLER.equals (id)) - return req; - throw new SAXNotRecognizedException (id); + if (EventFilter.DECL_HANDLER.equals (id)) + return req; + if (EventFilter.LEXICAL_HANDLER.equals (id)) + return req; + throw new SAXNotRecognizedException (id); } @@ -187,71 +187,71 @@ final public class CallFilter implements EventConsumer // final class Requestor extends XMLWriter { - Requestor () - { - super ((Writer)null); - } - - public synchronized void startDocument () throws SAXException - { - // Connect to remote object and set up to send it XML text - try { - if (conn != null) - throw new IllegalStateException ("call is being made"); - - conn = target.openConnection (); - conn.setDoOutput (true); - conn.setRequestProperty ("Content-Type", - "application/xml;charset=UTF-8"); - - setWriter (new OutputStreamWriter ( - conn.getOutputStream (), - "UTF8"), "UTF-8"); - - } catch (IOException e) { - fatal ("can't write (POST) to URI: " + target, e); - } - - // NOW base class can safely write that text! - super.startDocument (); - } - - public void endDocument () throws SAXException - { - // - // Finish writing the request (for HTTP, a POST); - // this closes the output stream. - // - super.endDocument (); - - // - // Receive the response. - // Produce events for the next stage. - // - InputSource source; - XMLReader producer; - String encoding; - - try { - - source = new InputSource (conn.getInputStream ()); + Requestor () + { + super ((Writer)null); + } + + public synchronized void startDocument () throws SAXException + { + // Connect to remote object and set up to send it XML text + try { + if (conn != null) + throw new IllegalStateException ("call is being made"); + + conn = target.openConnection (); + conn.setDoOutput (true); + conn.setRequestProperty ("Content-Type", + "application/xml;charset=UTF-8"); + + setWriter (new OutputStreamWriter ( + conn.getOutputStream (), + "UTF8"), "UTF-8"); + + } catch (IOException e) { + fatal ("can't write (POST) to URI: " + target, e); + } + + // NOW base class can safely write that text! + super.startDocument (); + } + + public void endDocument () throws SAXException + { + // + // Finish writing the request (for HTTP, a POST); + // this closes the output stream. + // + super.endDocument (); + + // + // Receive the response. + // Produce events for the next stage. + // + InputSource source; + XMLReader producer; + String encoding; + + try { + + source = new InputSource (conn.getInputStream ()); // FIXME if status is anything but success, report it!! It'd be good to // save the request data just in case we need to deal with a forward. - encoding = Resolver.getEncoding (conn.getContentType ()); - if (encoding != null) - source.setEncoding (encoding); + encoding = Resolver.getEncoding (conn.getContentType ()); + if (encoding != null) + source.setEncoding (encoding); - producer = XMLReaderFactory.createXMLReader (); - producer.setErrorHandler (getErrorHandler ()); - EventFilter.bind (producer, next); - producer.parse (source); - conn = null; + producer = XMLReaderFactory.createXMLReader (); + producer.setErrorHandler (getErrorHandler ()); + EventFilter.bind (producer, next); + producer.parse (source); + conn = null; - } catch (IOException e) { - fatal ("I/O Exception reading response, " + e.getMessage (), e); - } - } + } catch (IOException e) { + fatal ("I/O Exception reading response, " + e.getMessage (), e); + } + } } } diff --git a/libjava/classpath/gnu/xml/pipeline/DomConsumer.java b/libjava/classpath/gnu/xml/pipeline/DomConsumer.java index 53f7f24..141f36e 100644 --- a/libjava/classpath/gnu/xml/pipeline/DomConsumer.java +++ b/libjava/classpath/gnu/xml/pipeline/DomConsumer.java @@ -1,4 +1,4 @@ -/* DomConsumer.java -- +/* DomConsumer.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -105,17 +105,17 @@ import org.w3c.dom.Text; */ public class DomConsumer implements EventConsumer { - private Class domImpl; + private Class domImpl; - private boolean hidingCDATA = true; - private boolean hidingComments = true; - private boolean hidingWhitespace = true; - private boolean hidingReferences = true; + private boolean hidingCDATA = true; + private boolean hidingComments = true; + private boolean hidingWhitespace = true; + private boolean hidingReferences = true; - private Handler handler; - private ErrorHandler errHandler; + private Handler handler; + private ErrorHandler errHandler; - private EventConsumer next; + private EventConsumer next; // FIXME: this can't be a generic pipeline stage just now, // since its input became a Class not a String (to be turned @@ -127,16 +127,16 @@ public class DomConsumer implements EventConsumer * of DOM when constructing its result value. * * @param impl class implementing {@link org.w3c.dom.Document Document} - * which publicly exposes a default constructor + * which publicly exposes a default constructor * * @exception SAXException when there is a problem creating an - * empty DOM document using the specified implementation + * empty DOM document using the specified implementation */ public DomConsumer (Class impl) throws SAXException { - domImpl = impl; - handler = new Handler (this); + domImpl = impl; + handler = new Handler (this); } /** @@ -148,22 +148,22 @@ public class DomConsumer implements EventConsumer */ protected void setHandler (Handler h) { - handler = h; + handler = h; } private Document emptyDocument () throws SAXException { - try { - return (Document) domImpl.newInstance (); - } catch (IllegalAccessException e) { - throw new SAXException ("can't access constructor: " - + e.getMessage ()); - } catch (InstantiationException e) { - throw new SAXException ("can't instantiate Document: " - + e.getMessage ()); - } + try { + return (Document) domImpl.newInstance (); + } catch (IllegalAccessException e) { + throw new SAXException ("can't access constructor: " + + e.getMessage ()); + } catch (InstantiationException e) { + throw new SAXException ("can't instantiate Document: " + + e.getMessage ()); + } } @@ -178,18 +178,18 @@ public class DomConsumer implements EventConsumer * copy of the input event stream, use a {@link TeeConsumer}. * * @param impl class implementing {@link org.w3c.dom.Document Document} - * which publicly exposes a default constructor + * which publicly exposes a default constructor * @param next receives a "replayed" sequence of parse events when - * the <em>endDocument</em> method is invoked. + * the <em>endDocument</em> method is invoked. * * @exception SAXException when there is a problem creating an - * empty DOM document using the specified DOM implementation + * empty DOM document using the specified DOM implementation */ public DomConsumer (Class impl, EventConsumer n) throws SAXException { - this (impl); - next = n; + this (impl); + next = n; } @@ -197,16 +197,16 @@ public class DomConsumer implements EventConsumer * Returns the document constructed from the preceding * sequence of events. This method should not be * used again until another sequence of events has been - * given to this EventConsumer. + * given to this EventConsumer. */ final public Document getDocument () { - return handler.clearDocument (); + return handler.clearDocument (); } public void setErrorHandler (ErrorHandler handler) { - errHandler = handler; + errHandler = handler; } @@ -219,8 +219,8 @@ public class DomConsumer implements EventConsumer * * @see #setHidingReferences */ - final public boolean isHidingReferences () - { return hidingReferences; } + final public boolean isHidingReferences () + { return hidingReferences; } /** * Controls whether the consumer will hide entity expansions, @@ -229,9 +229,9 @@ public class DomConsumer implements EventConsumer * @see #isHidingReferences * @param flag False if entity reference nodes will appear */ - final public void setHidingReferences (boolean flag) - { hidingReferences = flag; } - + final public void setHidingReferences (boolean flag) + { hidingReferences = flag; } + /** * Returns true if the consumer is hiding comments (the default), @@ -240,7 +240,7 @@ public class DomConsumer implements EventConsumer * @see #setHidingComments */ public final boolean isHidingComments () - { return hidingComments; } + { return hidingComments; } /** * Controls whether the consumer is hiding comments. @@ -248,7 +248,7 @@ public class DomConsumer implements EventConsumer * @see #isHidingComments */ public final void setHidingComments (boolean flag) - { hidingComments = flag; } + { hidingComments = flag; } /** @@ -259,7 +259,7 @@ public class DomConsumer implements EventConsumer * @see #setHidingWhitespace */ public final boolean isHidingWhitespace () - { return hidingWhitespace; } + { return hidingWhitespace; } /** * Controls whether the consumer hides ignorable whitespace @@ -267,7 +267,7 @@ public class DomConsumer implements EventConsumer * @see #isHidingComments */ public final void setHidingWhitespace (boolean flag) - { hidingWhitespace = flag; } + { hidingWhitespace = flag; } /** @@ -276,28 +276,28 @@ public class DomConsumer implements EventConsumer * * @see #setHidingCDATA */ - final public boolean isHidingCDATA () - { return hidingCDATA; } + final public boolean isHidingCDATA () + { return hidingCDATA; } /** * Controls whether the consumer will save CDATA boundaries. * * @see #isHidingCDATA * @param flag True to treat CDATA text differently from other - * text nodes + * text nodes */ - final public void setHidingCDATA (boolean flag) - { hidingCDATA = flag; } - + final public void setHidingCDATA (boolean flag) + { hidingCDATA = flag; } + /** Returns the document handler being used. */ final public ContentHandler getContentHandler () - { return handler; } + { return handler; } /** Returns the DTD handler being used. */ final public DTDHandler getDTDHandler () - { return handler; } + { return handler; } /** * Returns the lexical handler being used. @@ -306,11 +306,11 @@ public class DomConsumer implements EventConsumer final public Object getProperty (String id) throws SAXNotRecognizedException { - if ("http://xml.org/sax/properties/lexical-handler".equals (id)) - return handler; - if ("http://xml.org/sax/properties/declaration-handler".equals (id)) - return handler; - throw new SAXNotRecognizedException (id); + if ("http://xml.org/sax/properties/lexical-handler".equals (id)) + return handler; + if ("http://xml.org/sax/properties/declaration-handler".equals (id)) + return handler; + throw new SAXNotRecognizedException (id); } EventConsumer getNext () { return next; } @@ -320,7 +320,7 @@ public class DomConsumer implements EventConsumer /** * Class used to intercept various parsing events and use them to * populate a DOM document. Subclasses would typically know and use - * backdoors into specific DOM implementations, used to implement + * backdoors into specific DOM implementations, used to implement * DTD-related functionality. * * <p> Note that if this ever throws a DOMException (runtime exception) @@ -329,639 +329,639 @@ public class DomConsumer implements EventConsumer * accepted illegal input data). </p> */ public static class Handler - implements ContentHandler, LexicalHandler, - DTDHandler, DeclHandler + implements ContentHandler, LexicalHandler, + DTDHandler, DeclHandler { - protected DomConsumer consumer; - - private DOMImplementation impl; - private Document document; - private boolean isL2; - - private Locator locator; - private Node top; - private boolean inCDATA; - private boolean mergeCDATA; - private boolean inDTD; - private String currentEntity; - - private boolean recreatedAttrs; - private AttributesImpl attributes = new AttributesImpl (); - - /** - * Subclasses may use SAX2 events to provide additional - * behaviors in the resulting DOM. - */ - protected Handler (DomConsumer consumer) - throws SAXException - { - this.consumer = consumer; - document = consumer.emptyDocument (); - impl = document.getImplementation (); - isL2 = impl.hasFeature ("XML", "2.0"); - } - - private void fatal (String message, Exception x) - throws SAXException - { - SAXParseException e; - ErrorHandler errHandler = consumer.getErrorHandler (); - - if (locator == null) - e = new SAXParseException (message, null, null, -1, -1, x); - else - e = new SAXParseException (message, locator, x); - if (errHandler != null) - errHandler.fatalError (e); - throw e; - } - - /** - * Returns and forgets the document produced. If the handler is - * reused, a new document may be created. - */ - Document clearDocument () - { - Document retval = document; - document = null; - locator = null; - return retval; - } - - /** - * Returns the document under construction. - */ - protected Document getDocument () - { return document; } - - /** - * Returns the current node being populated. This is usually - * an Element or Document, but it might be an EntityReference - * node if some implementation-specific code knows how to put - * those into the result tree and later mark them as readonly. - */ - protected Node getTop () - { return top; } - - - // SAX1 - public void setDocumentLocator (Locator locator) - { - this.locator = locator; - } - - // SAX1 - public void startDocument () - throws SAXException - { - if (document == null) - try { - if (isL2) { - // couple to original implementation - document = impl.createDocument (null, "foo", null); - document.removeChild (document.getFirstChild ()); - } else { - document = consumer.emptyDocument (); - } - } catch (Exception e) { - fatal ("DOM create document", e); - } - top = document; - } - - // SAX1 - public void endDocument () - throws SAXException - { - try { - if (consumer.getNext () != null && document != null) { - DomParser parser = new DomParser (document); - - EventFilter.bind (parser, consumer.getNext ()); - parser.parse ("ignored"); - } - } finally { - top = null; - } - } - - // SAX1 - public void processingInstruction (String target, String data) - throws SAXException - { - // we can't create populated entity ref nodes using - // only public DOM APIs (they've got to be readonly) - if (currentEntity != null) - return; - - ProcessingInstruction pi; - - if (isL2 - // && consumer.isUsingNamespaces () - && target.indexOf (':') != -1) - namespaceError ( - "PI target name is namespace nonconformant: " - + target); - if (inDTD) - return; - pi = document.createProcessingInstruction (target, data); - top.appendChild (pi); - } - - /** - * Subclasses may overrride this method to provide a more efficient - * way to construct text nodes. - * Typically, copying the text into a single character array will - * be more efficient than doing that as well as allocating other - * needed for a String, including an internal StringBuffer. - * Those additional memory and CPU costs can be incurred later, - * if ever needed. - * Unfortunately the standard DOM factory APIs encourage those costs - * to be incurred early. - */ - protected Text createText ( - boolean isCDATA, - char ch [], - int start, - int length - ) { - String value = new String (ch, start, length); - - if (isCDATA) - return document.createCDATASection (value); - else - return document.createTextNode (value); - } - - // SAX1 - public void characters (char ch [], int start, int length) - throws SAXException - { - // we can't create populated entity ref nodes using - // only public DOM APIs (they've got to be readonly - // at creation time) - if (currentEntity != null) - return; - - Node lastChild = top.getLastChild (); - - // merge consecutive text or CDATA nodes if appropriate. - if (lastChild instanceof Text) { - if (consumer.isHidingCDATA () - // consecutive Text content ... always merge - || (!inCDATA - && !(lastChild instanceof CDATASection)) - // consecutive CDATASection content ... don't - // merge between sections, only within them - || (inCDATA && mergeCDATA - && lastChild instanceof CDATASection) - ) { - CharacterData last = (CharacterData) lastChild; - String value = new String (ch, start, length); - - last.appendData (value); - return; - } - } - if (inCDATA && !consumer.isHidingCDATA ()) { - top.appendChild (createText (true, ch, start, length)); - mergeCDATA = true; - } else - top.appendChild (createText (false, ch, start, length)); - } - - // SAX2 - public void skippedEntity (String name) - throws SAXException - { - // this callback is useless except to report errors, since - // we can't know if the ref was in content, within an - // attribute, within a declaration ... only one of those - // cases supports more intelligent action than a panic. - fatal ("skipped entity: " + name, null); - } - - // SAX2 - public void startPrefixMapping (String prefix, String uri) - throws SAXException - { - // reconstruct "xmlns" attributes deleted by all - // SAX2 parsers without "namespace-prefixes" = true - if ("".equals (prefix)) - attributes.addAttribute ("", "", "xmlns", - "CDATA", uri); - else - attributes.addAttribute ("", "", "xmlns:" + prefix, - "CDATA", uri); - recreatedAttrs = true; - } - - // SAX2 - public void endPrefixMapping (String prefix) - throws SAXException - { } - - // SAX2 - public void startElement ( - String uri, - String localName, - String qName, - Attributes atts - ) throws SAXException - { - // we can't create populated entity ref nodes using - // only public DOM APIs (they've got to be readonly) - if (currentEntity != null) - return; - - // parser discarded basic information; DOM tree isn't writable - // without massaging to assign prefixes to all nodes. - // the "NSFilter" class does that massaging. - if (qName.length () == 0) - qName = localName; - - - Element element; - int length = atts.getLength (); - - if (!isL2) { - element = document.createElement (qName); - - // first the explicit attributes ... - length = atts.getLength (); - for (int i = 0; i < length; i++) - element.setAttribute (atts.getQName (i), - atts.getValue (i)); - // ... then any recreated ones (DOM deletes duplicates) - if (recreatedAttrs) { - recreatedAttrs = false; - length = attributes.getLength (); - for (int i = 0; i < length; i++) - element.setAttribute (attributes.getQName (i), - attributes.getValue (i)); - attributes.clear (); - } - - top.appendChild (element); - top = element; - return; - } - - // For an L2 DOM when namespace use is enabled, use - // createElementNS/createAttributeNS except when - // (a) it's an element in the default namespace, or - // (b) it's an attribute with no prefix - String namespace; - - if (localName.length () != 0) - namespace = (uri.length () == 0) ? null : uri; - else - namespace = getNamespace (getPrefix (qName), atts); - - if (namespace == null) - element = document.createElement (qName); - else - element = document.createElementNS (namespace, qName); - - populateAttributes (element, atts); - if (recreatedAttrs) { - recreatedAttrs = false; - // ... DOM deletes any duplicates - populateAttributes (element, attributes); - attributes.clear (); - } - - top.appendChild (element); - top = element; - } - - final static String xmlnsURI = "http://www.w3.org/2000/xmlns/"; - - private void populateAttributes (Element element, Attributes attrs) - throws SAXParseException - { - int length = attrs.getLength (); - - for (int i = 0; i < length; i++) { - String type = attrs.getType (i); - String value = attrs.getValue (i); - String name = attrs.getQName (i); - String local = attrs.getLocalName (i); - String uri = attrs.getURI (i); - - // parser discarded basic information, DOM tree isn't writable - if (name.length () == 0) - name = local; - - // all attribute types other than these three may not - // contain scoped names... enumerated attributes get - // reported as NMTOKEN, except for NOTATION values - if (!("CDATA".equals (type) - || "NMTOKEN".equals (type) - || "NMTOKENS".equals (type))) { - if (value.indexOf (':') != -1) { - namespaceError ( - "namespace nonconformant attribute value: " - + "<" + element.getNodeName () - + " " + name + "='" + value + "' ...>"); - } - } - - // xmlns="" is legal (undoes default NS) - // xmlns:foo="" is illegal - String prefix = getPrefix (name); - String namespace; - - if ("xmlns".equals (prefix)) { - if ("".equals (value)) - namespaceError ("illegal null namespace decl, " + name); - namespace = xmlnsURI; - } else if ("xmlns".equals (name)) - namespace = xmlnsURI; - - else if (prefix == null) - namespace = null; - else if (!"".equals(uri) && uri.length () != 0) - namespace = uri; - else - namespace = getNamespace (prefix, attrs); - - if (namespace == null) - element.setAttribute (name, value); - else - element.setAttributeNS (namespace, name, value); - } - } - - private String getPrefix (String name) - { - int temp; - - if ((temp = name.indexOf (':')) > 0) - return name.substring (0, temp); - return null; - } - - // used with SAX1-level parser output - private String getNamespace (String prefix, Attributes attrs) - throws SAXParseException - { - String namespace; - String decl; - - // defaulting - if (prefix == null) { - decl = "xmlns"; - namespace = attrs.getValue (decl); - if ("".equals (namespace)) - return null; - else if (namespace != null) - return namespace; - - // "xmlns" is like a keyword - // ... according to the Namespace REC, but DOM L2 CR2+ - // and Infoset violate that by assigning a namespace. - // that conflict is resolved elsewhere. - } else if ("xmlns".equals (prefix)) - return null; - - // "xml" prefix is fixed - else if ("xml".equals (prefix)) - return "http://www.w3.org/XML/1998/namespace"; - - // otherwise, expect a declaration - else { - decl = "xmlns:" + prefix; - namespace = attrs.getValue (decl); - } - - // if we found a local declaration, great - if (namespace != null) - return namespace; - - - // ELSE ... search up the tree we've been building - for (Node n = top; - n != null && n.getNodeType () != Node.DOCUMENT_NODE; - n = n.getParentNode ()) { - if (n.getNodeType () == Node.ENTITY_REFERENCE_NODE) - continue; - Element e = (Element) n; - Attr attr = e.getAttributeNode (decl); - if (attr != null) - return attr.getNodeValue (); - } - // see above re "xmlns" as keyword - if ("xmlns".equals (decl)) - return null; - - namespaceError ("Undeclared namespace prefix: " + prefix); - return null; - } - - // SAX2 - public void endElement (String uri, String localName, String qName) - throws SAXException - { - // we can't create populated entity ref nodes using - // only public DOM APIs (they've got to be readonly) - if (currentEntity != null) - return; - - top = top.getParentNode (); - } - - // SAX1 (mandatory reporting if validating) - public void ignorableWhitespace (char ch [], int start, int length) - throws SAXException - { - if (consumer.isHidingWhitespace ()) - return; - characters (ch, start, length); - } - - // SAX2 lexical event - public void startCDATA () - throws SAXException - { - inCDATA = true; - // true except for the first fragment of a cdata section - mergeCDATA = false; - } - - // SAX2 lexical event - public void endCDATA () - throws SAXException - { - inCDATA = false; - } - - // SAX2 lexical event - // - // this SAX2 callback merges two unrelated things: - // - Declaration of the root element type ... belongs with - // the other DTD declaration methods, NOT HERE. - // - IDs for the optional external subset ... belongs here - // with other lexical information. - // - // ...and it doesn't include the internal DTD subset, desired - // both to support DOM L2 and to enable "pass through" processing - // - public void startDTD (String name, String publicId, String SystemId) - throws SAXException - { - // need to filter out comments and PIs within the DTD - inDTD = true; - } - - // SAX2 lexical event - public void endDTD () - throws SAXException - { - inDTD = false; - } - - // SAX2 lexical event - public void comment (char ch [], int start, int length) - throws SAXException - { - Node comment; - - // we can't create populated entity ref nodes using - // only public DOM APIs (they've got to be readonly) - if (consumer.isHidingComments () - || inDTD - || currentEntity != null) - return; - comment = document.createComment (new String (ch, start, length)); - top.appendChild (comment); - } - - /** - * May be overridden by subclasses to return true, indicating - * that entity reference nodes can be populated and then made - * read-only. - */ - public boolean canPopulateEntityRefs () - { return false; } - - // SAX2 lexical event - public void startEntity (String name) - throws SAXException - { - // are we ignoring what would be contents of an - // entity ref, since we can't populate it? - if (currentEntity != null) - return; - - // Are we hiding all entity boundaries? - if (consumer.isHidingReferences ()) - return; - - // SAX2 shows parameter entities; DOM hides them - if (name.charAt (0) == '%' || "[dtd]".equals (name)) - return; - - // Since we can't create a populated entity ref node in any - // standard way, we create an unpopulated one. - EntityReference ref = document.createEntityReference (name); - top.appendChild (ref); - top = ref; - - // ... allowing subclasses to populate them - if (!canPopulateEntityRefs ()) - currentEntity = name; - } - - // SAX2 lexical event - public void endEntity (String name) - throws SAXException - { - if (name.charAt (0) == '%' || "[dtd]".equals (name)) - return; - if (name.equals (currentEntity)) - currentEntity = null; - if (!consumer.isHidingReferences ()) - top = top.getParentNode (); - } - - - // SAX1 DTD event - public void notationDecl ( - String name, - String publicId, String SystemId - ) throws SAXException - { - /* IGNORE -- no public DOM API lets us store these - * into the doctype node - */ - } - - // SAX1 DTD event - public void unparsedEntityDecl ( - String name, - String publicId, String SystemId, - String notationName - ) throws SAXException - { - /* IGNORE -- no public DOM API lets us store these - * into the doctype node - */ - } - - // SAX2 declaration event - public void elementDecl (String name, String model) - throws SAXException - { - /* IGNORE -- no content model support in DOM L2 */ - } - - // SAX2 declaration event - public void attributeDecl ( - String eName, - String aName, - String type, - String mode, - String value - ) throws SAXException - { - /* IGNORE -- no attribute model support in DOM L2 */ - } - - // SAX2 declaration event - public void internalEntityDecl (String name, String value) - throws SAXException - { - /* IGNORE -- no public DOM API lets us store these - * into the doctype node - */ - } - - // SAX2 declaration event - public void externalEntityDecl ( - String name, - String publicId, - String SystemId - ) throws SAXException - { - /* IGNORE -- no public DOM API lets us store these - * into the doctype node - */ - } - - // - // These really should offer the option of nonfatal handling, - // like other validity errors, though that would cause major - // chaos in the DOM data structures. DOM is already spec'd - // to treat many of these as fatal, so this is consistent. - // - private void namespaceError (String description) - throws SAXParseException - { - SAXParseException err; - - err = new SAXParseException (description, locator); - throw err; - } + protected DomConsumer consumer; + + private DOMImplementation impl; + private Document document; + private boolean isL2; + + private Locator locator; + private Node top; + private boolean inCDATA; + private boolean mergeCDATA; + private boolean inDTD; + private String currentEntity; + + private boolean recreatedAttrs; + private AttributesImpl attributes = new AttributesImpl (); + + /** + * Subclasses may use SAX2 events to provide additional + * behaviors in the resulting DOM. + */ + protected Handler (DomConsumer consumer) + throws SAXException + { + this.consumer = consumer; + document = consumer.emptyDocument (); + impl = document.getImplementation (); + isL2 = impl.hasFeature ("XML", "2.0"); + } + + private void fatal (String message, Exception x) + throws SAXException + { + SAXParseException e; + ErrorHandler errHandler = consumer.getErrorHandler (); + + if (locator == null) + e = new SAXParseException (message, null, null, -1, -1, x); + else + e = new SAXParseException (message, locator, x); + if (errHandler != null) + errHandler.fatalError (e); + throw e; + } + + /** + * Returns and forgets the document produced. If the handler is + * reused, a new document may be created. + */ + Document clearDocument () + { + Document retval = document; + document = null; + locator = null; + return retval; + } + + /** + * Returns the document under construction. + */ + protected Document getDocument () + { return document; } + + /** + * Returns the current node being populated. This is usually + * an Element or Document, but it might be an EntityReference + * node if some implementation-specific code knows how to put + * those into the result tree and later mark them as readonly. + */ + protected Node getTop () + { return top; } + + + // SAX1 + public void setDocumentLocator (Locator locator) + { + this.locator = locator; + } + + // SAX1 + public void startDocument () + throws SAXException + { + if (document == null) + try { + if (isL2) { + // couple to original implementation + document = impl.createDocument (null, "foo", null); + document.removeChild (document.getFirstChild ()); + } else { + document = consumer.emptyDocument (); + } + } catch (Exception e) { + fatal ("DOM create document", e); + } + top = document; + } + + // SAX1 + public void endDocument () + throws SAXException + { + try { + if (consumer.getNext () != null && document != null) { + DomParser parser = new DomParser (document); + + EventFilter.bind (parser, consumer.getNext ()); + parser.parse ("ignored"); + } + } finally { + top = null; + } + } + + // SAX1 + public void processingInstruction (String target, String data) + throws SAXException + { + // we can't create populated entity ref nodes using + // only public DOM APIs (they've got to be readonly) + if (currentEntity != null) + return; + + ProcessingInstruction pi; + + if (isL2 + // && consumer.isUsingNamespaces () + && target.indexOf (':') != -1) + namespaceError ( + "PI target name is namespace nonconformant: " + + target); + if (inDTD) + return; + pi = document.createProcessingInstruction (target, data); + top.appendChild (pi); + } + + /** + * Subclasses may overrride this method to provide a more efficient + * way to construct text nodes. + * Typically, copying the text into a single character array will + * be more efficient than doing that as well as allocating other + * needed for a String, including an internal StringBuffer. + * Those additional memory and CPU costs can be incurred later, + * if ever needed. + * Unfortunately the standard DOM factory APIs encourage those costs + * to be incurred early. + */ + protected Text createText ( + boolean isCDATA, + char ch [], + int start, + int length + ) { + String value = new String (ch, start, length); + + if (isCDATA) + return document.createCDATASection (value); + else + return document.createTextNode (value); + } + + // SAX1 + public void characters (char ch [], int start, int length) + throws SAXException + { + // we can't create populated entity ref nodes using + // only public DOM APIs (they've got to be readonly + // at creation time) + if (currentEntity != null) + return; + + Node lastChild = top.getLastChild (); + + // merge consecutive text or CDATA nodes if appropriate. + if (lastChild instanceof Text) { + if (consumer.isHidingCDATA () + // consecutive Text content ... always merge + || (!inCDATA + && !(lastChild instanceof CDATASection)) + // consecutive CDATASection content ... don't + // merge between sections, only within them + || (inCDATA && mergeCDATA + && lastChild instanceof CDATASection) + ) { + CharacterData last = (CharacterData) lastChild; + String value = new String (ch, start, length); + + last.appendData (value); + return; + } + } + if (inCDATA && !consumer.isHidingCDATA ()) { + top.appendChild (createText (true, ch, start, length)); + mergeCDATA = true; + } else + top.appendChild (createText (false, ch, start, length)); + } + + // SAX2 + public void skippedEntity (String name) + throws SAXException + { + // this callback is useless except to report errors, since + // we can't know if the ref was in content, within an + // attribute, within a declaration ... only one of those + // cases supports more intelligent action than a panic. + fatal ("skipped entity: " + name, null); + } + + // SAX2 + public void startPrefixMapping (String prefix, String uri) + throws SAXException + { + // reconstruct "xmlns" attributes deleted by all + // SAX2 parsers without "namespace-prefixes" = true + if ("".equals (prefix)) + attributes.addAttribute ("", "", "xmlns", + "CDATA", uri); + else + attributes.addAttribute ("", "", "xmlns:" + prefix, + "CDATA", uri); + recreatedAttrs = true; + } + + // SAX2 + public void endPrefixMapping (String prefix) + throws SAXException + { } + + // SAX2 + public void startElement ( + String uri, + String localName, + String qName, + Attributes atts + ) throws SAXException + { + // we can't create populated entity ref nodes using + // only public DOM APIs (they've got to be readonly) + if (currentEntity != null) + return; + + // parser discarded basic information; DOM tree isn't writable + // without massaging to assign prefixes to all nodes. + // the "NSFilter" class does that massaging. + if (qName.length () == 0) + qName = localName; + + + Element element; + int length = atts.getLength (); + + if (!isL2) { + element = document.createElement (qName); + + // first the explicit attributes ... + length = atts.getLength (); + for (int i = 0; i < length; i++) + element.setAttribute (atts.getQName (i), + atts.getValue (i)); + // ... then any recreated ones (DOM deletes duplicates) + if (recreatedAttrs) { + recreatedAttrs = false; + length = attributes.getLength (); + for (int i = 0; i < length; i++) + element.setAttribute (attributes.getQName (i), + attributes.getValue (i)); + attributes.clear (); + } + + top.appendChild (element); + top = element; + return; + } + + // For an L2 DOM when namespace use is enabled, use + // createElementNS/createAttributeNS except when + // (a) it's an element in the default namespace, or + // (b) it's an attribute with no prefix + String namespace; + + if (localName.length () != 0) + namespace = (uri.length () == 0) ? null : uri; + else + namespace = getNamespace (getPrefix (qName), atts); + + if (namespace == null) + element = document.createElement (qName); + else + element = document.createElementNS (namespace, qName); + + populateAttributes (element, atts); + if (recreatedAttrs) { + recreatedAttrs = false; + // ... DOM deletes any duplicates + populateAttributes (element, attributes); + attributes.clear (); + } + + top.appendChild (element); + top = element; + } + + final static String xmlnsURI = "http://www.w3.org/2000/xmlns/"; + + private void populateAttributes (Element element, Attributes attrs) + throws SAXParseException + { + int length = attrs.getLength (); + + for (int i = 0; i < length; i++) { + String type = attrs.getType (i); + String value = attrs.getValue (i); + String name = attrs.getQName (i); + String local = attrs.getLocalName (i); + String uri = attrs.getURI (i); + + // parser discarded basic information, DOM tree isn't writable + if (name.length () == 0) + name = local; + + // all attribute types other than these three may not + // contain scoped names... enumerated attributes get + // reported as NMTOKEN, except for NOTATION values + if (!("CDATA".equals (type) + || "NMTOKEN".equals (type) + || "NMTOKENS".equals (type))) { + if (value.indexOf (':') != -1) { + namespaceError ( + "namespace nonconformant attribute value: " + + "<" + element.getNodeName () + + " " + name + "='" + value + "' ...>"); + } + } + + // xmlns="" is legal (undoes default NS) + // xmlns:foo="" is illegal + String prefix = getPrefix (name); + String namespace; + + if ("xmlns".equals (prefix)) { + if ("".equals (value)) + namespaceError ("illegal null namespace decl, " + name); + namespace = xmlnsURI; + } else if ("xmlns".equals (name)) + namespace = xmlnsURI; + + else if (prefix == null) + namespace = null; + else if (!"".equals(uri) && uri.length () != 0) + namespace = uri; + else + namespace = getNamespace (prefix, attrs); + + if (namespace == null) + element.setAttribute (name, value); + else + element.setAttributeNS (namespace, name, value); + } + } + + private String getPrefix (String name) + { + int temp; + + if ((temp = name.indexOf (':')) > 0) + return name.substring (0, temp); + return null; + } + + // used with SAX1-level parser output + private String getNamespace (String prefix, Attributes attrs) + throws SAXParseException + { + String namespace; + String decl; + + // defaulting + if (prefix == null) { + decl = "xmlns"; + namespace = attrs.getValue (decl); + if ("".equals (namespace)) + return null; + else if (namespace != null) + return namespace; + + // "xmlns" is like a keyword + // ... according to the Namespace REC, but DOM L2 CR2+ + // and Infoset violate that by assigning a namespace. + // that conflict is resolved elsewhere. + } else if ("xmlns".equals (prefix)) + return null; + + // "xml" prefix is fixed + else if ("xml".equals (prefix)) + return "http://www.w3.org/XML/1998/namespace"; + + // otherwise, expect a declaration + else { + decl = "xmlns:" + prefix; + namespace = attrs.getValue (decl); + } + + // if we found a local declaration, great + if (namespace != null) + return namespace; + + + // ELSE ... search up the tree we've been building + for (Node n = top; + n != null && n.getNodeType () != Node.DOCUMENT_NODE; + n = n.getParentNode ()) { + if (n.getNodeType () == Node.ENTITY_REFERENCE_NODE) + continue; + Element e = (Element) n; + Attr attr = e.getAttributeNode (decl); + if (attr != null) + return attr.getNodeValue (); + } + // see above re "xmlns" as keyword + if ("xmlns".equals (decl)) + return null; + + namespaceError ("Undeclared namespace prefix: " + prefix); + return null; + } + + // SAX2 + public void endElement (String uri, String localName, String qName) + throws SAXException + { + // we can't create populated entity ref nodes using + // only public DOM APIs (they've got to be readonly) + if (currentEntity != null) + return; + + top = top.getParentNode (); + } + + // SAX1 (mandatory reporting if validating) + public void ignorableWhitespace (char ch [], int start, int length) + throws SAXException + { + if (consumer.isHidingWhitespace ()) + return; + characters (ch, start, length); + } + + // SAX2 lexical event + public void startCDATA () + throws SAXException + { + inCDATA = true; + // true except for the first fragment of a cdata section + mergeCDATA = false; + } + + // SAX2 lexical event + public void endCDATA () + throws SAXException + { + inCDATA = false; + } + + // SAX2 lexical event + // + // this SAX2 callback merges two unrelated things: + // - Declaration of the root element type ... belongs with + // the other DTD declaration methods, NOT HERE. + // - IDs for the optional external subset ... belongs here + // with other lexical information. + // + // ...and it doesn't include the internal DTD subset, desired + // both to support DOM L2 and to enable "pass through" processing + // + public void startDTD (String name, String publicId, String SystemId) + throws SAXException + { + // need to filter out comments and PIs within the DTD + inDTD = true; + } + + // SAX2 lexical event + public void endDTD () + throws SAXException + { + inDTD = false; + } + + // SAX2 lexical event + public void comment (char ch [], int start, int length) + throws SAXException + { + Node comment; + + // we can't create populated entity ref nodes using + // only public DOM APIs (they've got to be readonly) + if (consumer.isHidingComments () + || inDTD + || currentEntity != null) + return; + comment = document.createComment (new String (ch, start, length)); + top.appendChild (comment); + } + + /** + * May be overridden by subclasses to return true, indicating + * that entity reference nodes can be populated and then made + * read-only. + */ + public boolean canPopulateEntityRefs () + { return false; } + + // SAX2 lexical event + public void startEntity (String name) + throws SAXException + { + // are we ignoring what would be contents of an + // entity ref, since we can't populate it? + if (currentEntity != null) + return; + + // Are we hiding all entity boundaries? + if (consumer.isHidingReferences ()) + return; + + // SAX2 shows parameter entities; DOM hides them + if (name.charAt (0) == '%' || "[dtd]".equals (name)) + return; + + // Since we can't create a populated entity ref node in any + // standard way, we create an unpopulated one. + EntityReference ref = document.createEntityReference (name); + top.appendChild (ref); + top = ref; + + // ... allowing subclasses to populate them + if (!canPopulateEntityRefs ()) + currentEntity = name; + } + + // SAX2 lexical event + public void endEntity (String name) + throws SAXException + { + if (name.charAt (0) == '%' || "[dtd]".equals (name)) + return; + if (name.equals (currentEntity)) + currentEntity = null; + if (!consumer.isHidingReferences ()) + top = top.getParentNode (); + } + + + // SAX1 DTD event + public void notationDecl ( + String name, + String publicId, String SystemId + ) throws SAXException + { + /* IGNORE -- no public DOM API lets us store these + * into the doctype node + */ + } + + // SAX1 DTD event + public void unparsedEntityDecl ( + String name, + String publicId, String SystemId, + String notationName + ) throws SAXException + { + /* IGNORE -- no public DOM API lets us store these + * into the doctype node + */ + } + + // SAX2 declaration event + public void elementDecl (String name, String model) + throws SAXException + { + /* IGNORE -- no content model support in DOM L2 */ + } + + // SAX2 declaration event + public void attributeDecl ( + String eName, + String aName, + String type, + String mode, + String value + ) throws SAXException + { + /* IGNORE -- no attribute model support in DOM L2 */ + } + + // SAX2 declaration event + public void internalEntityDecl (String name, String value) + throws SAXException + { + /* IGNORE -- no public DOM API lets us store these + * into the doctype node + */ + } + + // SAX2 declaration event + public void externalEntityDecl ( + String name, + String publicId, + String SystemId + ) throws SAXException + { + /* IGNORE -- no public DOM API lets us store these + * into the doctype node + */ + } + + // + // These really should offer the option of nonfatal handling, + // like other validity errors, though that would cause major + // chaos in the DOM data structures. DOM is already spec'd + // to treat many of these as fatal, so this is consistent. + // + private void namespaceError (String description) + throws SAXParseException + { + SAXParseException err; + + err = new SAXParseException (description, locator); + throw err; + } } } diff --git a/libjava/classpath/gnu/xml/pipeline/EventConsumer.java b/libjava/classpath/gnu/xml/pipeline/EventConsumer.java index 017bc7f..a0a8824 100644 --- a/libjava/classpath/gnu/xml/pipeline/EventConsumer.java +++ b/libjava/classpath/gnu/xml/pipeline/EventConsumer.java @@ -1,4 +1,4 @@ -/* EventConsumer.java -- +/* EventConsumer.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -75,7 +75,7 @@ public interface EventConsumer * @return The value of that property, if it is defined. * * @exception SAXNotRecognizedException Thrown if the particular - * pipeline stage does not understand the specified identifier. + * pipeline stage does not understand the specified identifier. */ public Object getProperty (String id) throws SAXNotRecognizedException; diff --git a/libjava/classpath/gnu/xml/pipeline/EventFilter.java b/libjava/classpath/gnu/xml/pipeline/EventFilter.java index af2113f..b3cc2d6 100644 --- a/libjava/classpath/gnu/xml/pipeline/EventFilter.java +++ b/libjava/classpath/gnu/xml/pipeline/EventFilter.java @@ -1,4 +1,4 @@ -/* EventFilter.java -- +/* EventFilter.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -89,35 +89,35 @@ import org.xml.sax.helpers.XMLFilterImpl; * {@link org.xml.sax.helpers.XMLFilterImpl XMLFilterImpl} class. * Key differences include: <ul> * - * <li> This fully separates consumer and producer roles: it - * does not implement the producer side <em>XMLReader</em> or - * <em>EntityResolver</em> interfaces, so it can only be used - * in "push" mode (it has no <em>parse()</em> methods). + * <li> This fully separates consumer and producer roles: it + * does not implement the producer side <em>XMLReader</em> or + * <em>EntityResolver</em> interfaces, so it can only be used + * in "push" mode (it has no <em>parse()</em> methods). * - * <li> "Extension" handlers are fully supported, enabling a - * richer set of application requirements. - * And it implements {@link EventConsumer}, which groups related - * consumer methods together, rather than leaving them separated. + * <li> "Extension" handlers are fully supported, enabling a + * richer set of application requirements. + * And it implements {@link EventConsumer}, which groups related + * consumer methods together, rather than leaving them separated. * - * <li> The chaining which is visible is "downstream" to the next - * consumer, not "upstream" to the preceding producer. - * It supports "fan-in", where - * a consumer can be fed by several producers. (For "fan-out", - * see the {@link TeeConsumer} class.) + * <li> The chaining which is visible is "downstream" to the next + * consumer, not "upstream" to the preceding producer. + * It supports "fan-in", where + * a consumer can be fed by several producers. (For "fan-out", + * see the {@link TeeConsumer} class.) * - * <li> Event chaining is set up differently. It is intended to - * work "upstream" from terminus towards producer, during filter - * construction, as described above. - * This is part of an early binding model: - * events don't need to pass through stages which ignore them. + * <li> Event chaining is set up differently. It is intended to + * work "upstream" from terminus towards producer, during filter + * construction, as described above. + * This is part of an early binding model: + * events don't need to pass through stages which ignore them. * - * <li> ErrorHandler support is separated, on the grounds that - * pipeline stages need to share the same error handling policy. - * For the same reason, error handler setup goes "downstream": - * when error handlers get set, they are passed to subsequent - * consumers. + * <li> ErrorHandler support is separated, on the grounds that + * pipeline stages need to share the same error handling policy. + * For the same reason, error handler setup goes "downstream": + * when error handlers get set, they are passed to subsequent + * consumers. * - * </ul> + * </ul> * * <p> The {@link #chainTo chainTo()} convenience routine supports chaining to * an XMLFilterImpl, in its role as a limited functionality event @@ -137,34 +137,34 @@ import org.xml.sax.helpers.XMLFilterImpl; */ public class EventFilter implements EventConsumer, ContentHandler, DTDHandler, - LexicalHandler, DeclHandler + LexicalHandler, DeclHandler { // SAX handlers - private ContentHandler docHandler, docNext; - private DTDHandler dtdHandler, dtdNext; - private LexicalHandler lexHandler, lexNext; - private DeclHandler declHandler, declNext; + private ContentHandler docHandler, docNext; + private DTDHandler dtdHandler, dtdNext; + private LexicalHandler lexHandler, lexNext; + private DeclHandler declHandler, declNext; // and ideally, one more for the stuff SAX2 doesn't show - private Locator locator; - private EventConsumer next; - private ErrorHandler errHandler; + private Locator locator; + private EventConsumer next; + private ErrorHandler errHandler; + - /** SAX2 URI prefix for standard feature flags. */ - public static final String FEATURE_URI - = "http://xml.org/sax/features/"; + public static final String FEATURE_URI + = "http://xml.org/sax/features/"; /** SAX2 URI prefix for standard properties (mostly for handlers). */ - public static final String PROPERTY_URI - = "http://xml.org/sax/properties/"; + public static final String PROPERTY_URI + = "http://xml.org/sax/properties/"; /** SAX2 property identifier for {@link DeclHandler} events */ - public static final String DECL_HANDLER - = PROPERTY_URI + "declaration-handler"; + public static final String DECL_HANDLER + = PROPERTY_URI + "declaration-handler"; /** SAX2 property identifier for {@link LexicalHandler} events */ - public static final String LEXICAL_HANDLER - = PROPERTY_URI + "lexical-handler"; - + public static final String LEXICAL_HANDLER + = PROPERTY_URI + "lexical-handler"; + // // These class objects will be null if the relevant class isn't linked. // Small configurations (pJava and some kinds of embedded systems) need @@ -176,11 +176,11 @@ public class EventFilter // that's associated with "this" class loader. But that wouldn't be true // for classes in another package. // - private static boolean loaded; - private static Class nsClass; - private static Class validClass; - private static Class wfClass; - private static Class xincClass; + private static boolean loaded; + private static Class nsClass; + private static Class validClass; + private static Class wfClass; + private static Class xincClass; static ClassLoader getClassLoader () { @@ -206,25 +206,25 @@ public class EventFilter static Class loadClass (ClassLoader classLoader, String className) { - try { - if (classLoader == null) - return Class.forName(className); - else - return classLoader.loadClass(className); - } catch (Exception e) { - return null; - } + try { + if (classLoader == null) + return Class.forName(className); + else + return classLoader.loadClass(className); + } catch (Exception e) { + return null; + } } static private void loadClasses () { - ClassLoader loader = getClassLoader (); + ClassLoader loader = getClassLoader (); - nsClass = loadClass (loader, "gnu.xml.pipeline.NSFilter"); - validClass = loadClass (loader, "gnu.xml.pipeline.ValidationConsumer"); - wfClass = loadClass (loader, "gnu.xml.pipeline.WellFormednessFilter"); - xincClass = loadClass (loader, "gnu.xml.pipeline.XIncludeFilter"); - loaded = true; + nsClass = loadClass (loader, "gnu.xml.pipeline.NSFilter"); + validClass = loadClass (loader, "gnu.xml.pipeline.ValidationConsumer"); + wfClass = loadClass (loader, "gnu.xml.pipeline.WellFormednessFilter"); + xincClass = loadClass (loader, "gnu.xml.pipeline.XIncludeFilter"); + loaded = true; } @@ -246,146 +246,146 @@ public class EventFilter * of the XMLReader implementation in use; for example, it permits * validating output of a {@link gnu.xml.util.DomParser}. <ul> * - * <li> {@link NSFilter} will be removed if the producer can be - * told not to discard namespace data, using the "namespace-prefixes" - * feature flag. + * <li> {@link NSFilter} will be removed if the producer can be + * told not to discard namespace data, using the "namespace-prefixes" + * feature flag. * - * <li> {@link ValidationConsumer} will be removed if the producer - * can be told to validate, using the "validation" feature flag. + * <li> {@link ValidationConsumer} will be removed if the producer + * can be told to validate, using the "validation" feature flag. * - * <li> {@link WellFormednessFilter} is always removed, on the - * grounds that no XMLReader is permitted to producee malformed - * event streams and this would just be processing overhead. + * <li> {@link WellFormednessFilter} is always removed, on the + * grounds that no XMLReader is permitted to producee malformed + * event streams and this would just be processing overhead. * - * <li> {@link XIncludeFilter} stops the special handling, except - * that it's told about the "namespace-prefixes" feature of the - * event producer so that the event stream is internally consistent. + * <li> {@link XIncludeFilter} stops the special handling, except + * that it's told about the "namespace-prefixes" feature of the + * event producer so that the event stream is internally consistent. * - * <li> The first consumer which is not one of those classes stops - * such special handling. This means that if you want to force - * one of those filters to be used, you could just precede it with - * an instance of {@link EventFilter} configured as a pass-through. - * You might need to do that if you are using an {@link NSFilter} - * subclass to fix names found in attributes or character data. + * <li> The first consumer which is not one of those classes stops + * such special handling. This means that if you want to force + * one of those filters to be used, you could just precede it with + * an instance of {@link EventFilter} configured as a pass-through. + * You might need to do that if you are using an {@link NSFilter} + * subclass to fix names found in attributes or character data. * - * </ul> + * </ul> * * <p> Other than that, this method works with any kind of event consumer, * not just event filters. Note that in all cases, the standard handlers * are assigned; any previous handler assignments for the handler will * be overridden. * - * @param producer will deliver events to the specified consumer + * @param producer will deliver events to the specified consumer * @param consumer pipeline supplying event handlers to be associated - * with the producer (may not be null) + * with the producer (may not be null) */ public static void bind (XMLReader producer, EventConsumer consumer) { - Class klass = null; - boolean prefixes; - - if (!loaded) - loadClasses (); - - // DOM building, printing, layered validation, and other - // things don't work well when prefix info is discarded. - // Include it by default, whenever possible. - try { - producer.setFeature (FEATURE_URI + "namespace-prefixes", - true); - prefixes = true; - } catch (SAXException e) { - prefixes = false; - } - - // NOTE: This loop doesn't use "instanceof", since that - // would prevent compiling/linking without those classes - // being present. - while (consumer != null) { - klass = consumer.getClass (); - - // we might have already changed this problematic SAX2 default. - if (nsClass != null && nsClass.isAssignableFrom (klass)) { - if (!prefixes) - break; - consumer = ((EventFilter)consumer).getNext (); - - // the parser _might_ do DTD validation by default ... - // if not, maybe we can change this setting. - } else if (validClass != null - && validClass.isAssignableFrom (klass)) { - try { - producer.setFeature (FEATURE_URI + "validation", - true); - consumer = ((ValidationConsumer)consumer).getNext (); - } catch (SAXException e) { - break; - } - - // parsers are required not to have such bugs - } else if (wfClass != null && wfClass.isAssignableFrom (klass)) { - consumer = ((WellFormednessFilter)consumer).getNext (); - - // stop on the first pipeline stage we can't remove - } else - break; - - if (consumer == null) - klass = null; - } - - // the actual setting here doesn't matter as much - // as that producer and consumer agree - if (xincClass != null && klass != null - && xincClass.isAssignableFrom (klass)) - ((XIncludeFilter)consumer).setSavingPrefixes (prefixes); - - // Some SAX parsers can't handle null handlers -- bleech - DefaultHandler2 h = new DefaultHandler2 (); - - if (consumer != null && consumer.getContentHandler () != null) - producer.setContentHandler (consumer.getContentHandler ()); - else - producer.setContentHandler (h); - if (consumer != null && consumer.getDTDHandler () != null) - producer.setDTDHandler (consumer.getDTDHandler ()); - else - producer.setDTDHandler (h); - - try { - Object dh; - - if (consumer != null) - dh = consumer.getProperty (DECL_HANDLER); - else - dh = null; - if (dh == null) - dh = h; - producer.setProperty (DECL_HANDLER, dh); - } catch (Exception e) { /* ignore */ } - try { - Object lh; - - if (consumer != null) - lh = consumer.getProperty (LEXICAL_HANDLER); - else - lh = null; - if (lh == null) - lh = h; - producer.setProperty (LEXICAL_HANDLER, lh); - } catch (Exception e) { /* ignore */ } - - // this binding goes the other way around - if (producer.getErrorHandler () == null) - producer.setErrorHandler (h); - if (consumer != null) - consumer.setErrorHandler (producer.getErrorHandler ()); - } - + Class klass = null; + boolean prefixes; + + if (!loaded) + loadClasses (); + + // DOM building, printing, layered validation, and other + // things don't work well when prefix info is discarded. + // Include it by default, whenever possible. + try { + producer.setFeature (FEATURE_URI + "namespace-prefixes", + true); + prefixes = true; + } catch (SAXException e) { + prefixes = false; + } + + // NOTE: This loop doesn't use "instanceof", since that + // would prevent compiling/linking without those classes + // being present. + while (consumer != null) { + klass = consumer.getClass (); + + // we might have already changed this problematic SAX2 default. + if (nsClass != null && nsClass.isAssignableFrom (klass)) { + if (!prefixes) + break; + consumer = ((EventFilter)consumer).getNext (); + + // the parser _might_ do DTD validation by default ... + // if not, maybe we can change this setting. + } else if (validClass != null + && validClass.isAssignableFrom (klass)) { + try { + producer.setFeature (FEATURE_URI + "validation", + true); + consumer = ((ValidationConsumer)consumer).getNext (); + } catch (SAXException e) { + break; + } + + // parsers are required not to have such bugs + } else if (wfClass != null && wfClass.isAssignableFrom (klass)) { + consumer = ((WellFormednessFilter)consumer).getNext (); + + // stop on the first pipeline stage we can't remove + } else + break; + + if (consumer == null) + klass = null; + } + + // the actual setting here doesn't matter as much + // as that producer and consumer agree + if (xincClass != null && klass != null + && xincClass.isAssignableFrom (klass)) + ((XIncludeFilter)consumer).setSavingPrefixes (prefixes); + + // Some SAX parsers can't handle null handlers -- bleech + DefaultHandler2 h = new DefaultHandler2 (); + + if (consumer != null && consumer.getContentHandler () != null) + producer.setContentHandler (consumer.getContentHandler ()); + else + producer.setContentHandler (h); + if (consumer != null && consumer.getDTDHandler () != null) + producer.setDTDHandler (consumer.getDTDHandler ()); + else + producer.setDTDHandler (h); + + try { + Object dh; + + if (consumer != null) + dh = consumer.getProperty (DECL_HANDLER); + else + dh = null; + if (dh == null) + dh = h; + producer.setProperty (DECL_HANDLER, dh); + } catch (Exception e) { /* ignore */ } + try { + Object lh; + + if (consumer != null) + lh = consumer.getProperty (LEXICAL_HANDLER); + else + lh = null; + if (lh == null) + lh = h; + producer.setProperty (LEXICAL_HANDLER, lh); + } catch (Exception e) { /* ignore */ } + + // this binding goes the other way around + if (producer.getErrorHandler () == null) + producer.setErrorHandler (h); + if (consumer != null) + consumer.setErrorHandler (producer.getErrorHandler ()); + } + /** * Initializes all handlers to null. */ - // constructor used by PipelineFactory + // constructor used by PipelineFactory public EventFilter () { } @@ -394,30 +394,30 @@ public class EventFilter * the specified consumer, making it easy to pass events through. * If the consumer is null, all handlers are initialzed to null. */ - // constructor used by PipelineFactory + // constructor used by PipelineFactory public EventFilter (EventConsumer consumer) { - if (consumer == null) - return; + if (consumer == null) + return; - next = consumer; + next = consumer; - // We delegate through the "xxNext" handlers, and - // report the "xxHandler" ones on our input side. + // We delegate through the "xxNext" handlers, and + // report the "xxHandler" ones on our input side. - // Normally a subclass would both override handler - // methods and register itself as the "xxHandler". + // Normally a subclass would both override handler + // methods and register itself as the "xxHandler". - docHandler = docNext = consumer.getContentHandler (); - dtdHandler = dtdNext = consumer.getDTDHandler (); - try { - declHandler = declNext = (DeclHandler) - consumer.getProperty (DECL_HANDLER); - } catch (SAXException e) { /* leave value null */ } - try { - lexHandler = lexNext = (LexicalHandler) - consumer.getProperty (LEXICAL_HANDLER); - } catch (SAXException e) { /* leave value null */ } + docHandler = docNext = consumer.getContentHandler (); + dtdHandler = dtdNext = consumer.getDTDHandler (); + try { + declHandler = declNext = (DeclHandler) + consumer.getProperty (DECL_HANDLER); + } catch (SAXException e) { /* leave value null */ } + try { + lexHandler = lexNext = (LexicalHandler) + consumer.getProperty (LEXICAL_HANDLER); + } catch (SAXException e) { /* leave value null */ } } /** @@ -442,33 +442,33 @@ public class EventFilter * * @param next the next downstream component of the pipeline. * @exception IllegalStateException if the "next" consumer has - * already been set through the constructor. + * already been set through the constructor. */ public void chainTo (XMLFilterImpl next) { - if (this.next != null) - throw new IllegalStateException (); + if (this.next != null) + throw new IllegalStateException (); - docNext = next.getContentHandler (); - if (docHandler == null) - docHandler = docNext; - dtdNext = next.getDTDHandler (); - if (dtdHandler == null) - dtdHandler = dtdNext; + docNext = next.getContentHandler (); + if (docHandler == null) + docHandler = docNext; + dtdNext = next.getDTDHandler (); + if (dtdHandler == null) + dtdHandler = dtdNext; - try { - declNext = (DeclHandler) next.getProperty (DECL_HANDLER); - if (declHandler == null) - declHandler = declNext; - } catch (SAXException e) { /* leave value null */ } - try { - lexNext = (LexicalHandler) next.getProperty (LEXICAL_HANDLER); - if (lexHandler == null) - lexHandler = lexNext; - } catch (SAXException e) { /* leave value null */ } + try { + declNext = (DeclHandler) next.getProperty (DECL_HANDLER); + if (declHandler == null) + declHandler = declNext; + } catch (SAXException e) { /* leave value null */ } + try { + lexNext = (LexicalHandler) next.getProperty (LEXICAL_HANDLER); + if (lexHandler == null) + lexHandler = lexNext; + } catch (SAXException e) { /* leave value null */ } - if (errHandler != null) - next.setErrorHandler (errHandler); + if (errHandler != null) + next.setErrorHandler (errHandler); } /** @@ -477,9 +477,9 @@ public class EventFilter */ final public void setErrorHandler (ErrorHandler handler) { - errHandler = handler; - if (next != null) - next.setErrorHandler (handler); + errHandler = handler; + if (next != null) + next.setErrorHandler (handler); } /** @@ -488,7 +488,7 @@ public class EventFilter */ final public ErrorHandler getErrorHandler () { - return errHandler; + return errHandler; } @@ -497,7 +497,7 @@ public class EventFilter * is no such handler. */ final public EventConsumer getNext () - { return next; } + { return next; } /** @@ -508,13 +508,13 @@ public class EventFilter */ final public void setContentHandler (ContentHandler h) { - docHandler = h; + docHandler = h; } /** Returns the content handler being used. */ final public ContentHandler getContentHandler () { - return docHandler; + return docHandler; } /** @@ -524,12 +524,12 @@ public class EventFilter * probably pointed to the next consumer by the base class constructor. */ final public void setDTDHandler (DTDHandler h) - { dtdHandler = h; } + { dtdHandler = h; } /** Returns the dtd handler being used. */ final public DTDHandler getDTDHandler () { - return dtdHandler; + return dtdHandler; } /** @@ -541,36 +541,36 @@ public class EventFilter final public void setProperty (String id, Object o) throws SAXNotRecognizedException, SAXNotSupportedException { - try { - Object value = getProperty (id); - - if (value == o) - return; - if (DECL_HANDLER.equals (id)) { - declHandler = (DeclHandler) o; - return; - } - if (LEXICAL_HANDLER.equals (id)) { - lexHandler = (LexicalHandler) o; - return; - } - throw new SAXNotSupportedException (id); - - } catch (ClassCastException e) { - throw new SAXNotSupportedException (id); - } + try { + Object value = getProperty (id); + + if (value == o) + return; + if (DECL_HANDLER.equals (id)) { + declHandler = (DeclHandler) o; + return; + } + if (LEXICAL_HANDLER.equals (id)) { + lexHandler = (LexicalHandler) o; + return; + } + throw new SAXNotSupportedException (id); + + } catch (ClassCastException e) { + throw new SAXNotSupportedException (id); + } } /** Retrieves a property of unknown intent (usually a handler) */ final public Object getProperty (String id) throws SAXNotRecognizedException { - if (DECL_HANDLER.equals (id)) - return declHandler; - if (LEXICAL_HANDLER.equals (id)) - return lexHandler; + if (DECL_HANDLER.equals (id)) + return declHandler; + if (LEXICAL_HANDLER.equals (id)) + return lexHandler; - throw new SAXNotRecognizedException (id); + throw new SAXNotRecognizedException (id); } /** @@ -578,7 +578,7 @@ public class EventFilter * (or a subclass) is handling {@link ContentHandler } events. */ public Locator getDocumentLocator () - { return locator; } + { return locator; } // CONTENT HANDLER DELEGATIONS @@ -586,113 +586,113 @@ public class EventFilter /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void setDocumentLocator (Locator locator) { - this.locator = locator; - if (docNext != null) - docNext.setDocumentLocator (locator); + this.locator = locator; + if (docNext != null) + docNext.setDocumentLocator (locator); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void startDocument () throws SAXException { - if (docNext != null) - docNext.startDocument (); + if (docNext != null) + docNext.startDocument (); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void skippedEntity (String name) throws SAXException { - if (docNext != null) - docNext.skippedEntity (name); + if (docNext != null) + docNext.skippedEntity (name); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void processingInstruction (String target, String data) throws SAXException { - if (docNext != null) - docNext.processingInstruction (target, data); + if (docNext != null) + docNext.processingInstruction (target, data); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void characters (char ch [], int start, int length) throws SAXException { - if (docNext != null) - docNext.characters (ch, start, length); + if (docNext != null) + docNext.characters (ch, start, length); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void ignorableWhitespace (char ch [], int start, int length) throws SAXException { - if (docNext != null) - docNext.ignorableWhitespace (ch, start, length); + if (docNext != null) + docNext.ignorableWhitespace (ch, start, length); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void startPrefixMapping (String prefix, String uri) throws SAXException { - if (docNext != null) - docNext.startPrefixMapping (prefix, uri); + if (docNext != null) + docNext.startPrefixMapping (prefix, uri); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void startElement ( - String uri, String localName, - String qName, Attributes atts + String uri, String localName, + String qName, Attributes atts ) throws SAXException { - if (docNext != null) - docNext.startElement (uri, localName, qName, atts); + if (docNext != null) + docNext.startElement (uri, localName, qName, atts); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void endElement (String uri, String localName, String qName) throws SAXException { - if (docNext != null) - docNext.endElement (uri, localName, qName); + if (docNext != null) + docNext.endElement (uri, localName, qName); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void endPrefixMapping (String prefix) throws SAXException { - if (docNext != null) - docNext.endPrefixMapping (prefix); + if (docNext != null) + docNext.endPrefixMapping (prefix); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void endDocument () throws SAXException { - if (docNext != null) - docNext.endDocument (); - locator = null; + if (docNext != null) + docNext.endDocument (); + locator = null; } // DTD HANDLER DELEGATIONS - + /** <b>SAX1:</b> passes this callback to the next consumer, if any */ public void unparsedEntityDecl ( - String name, - String publicId, - String systemId, - String notationName + String name, + String publicId, + String systemId, + String notationName ) throws SAXException { - if (dtdNext != null) - dtdNext.unparsedEntityDecl (name, publicId, systemId, notationName); + if (dtdNext != null) + dtdNext.unparsedEntityDecl (name, publicId, systemId, notationName); } - + /** <b>SAX1:</b> passes this callback to the next consumer, if any */ public void notationDecl (String name, String publicId, String systemId) throws SAXException { - if (dtdNext != null) - dtdNext.notationDecl (name, publicId, systemId); + if (dtdNext != null) + dtdNext.notationDecl (name, publicId, systemId); } - + // LEXICAL HANDLER DELEGATIONS @@ -700,40 +700,40 @@ public class EventFilter public void startDTD (String name, String publicId, String systemId) throws SAXException { - if (lexNext != null) - lexNext.startDTD (name, publicId, systemId); + if (lexNext != null) + lexNext.startDTD (name, publicId, systemId); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void endDTD () throws SAXException { - if (lexNext != null) - lexNext.endDTD (); + if (lexNext != null) + lexNext.endDTD (); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void comment (char ch [], int start, int length) throws SAXException { - if (lexNext != null) - lexNext.comment (ch, start, length); + if (lexNext != null) + lexNext.comment (ch, start, length); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void startCDATA () throws SAXException { - if (lexNext != null) - lexNext.startCDATA (); + if (lexNext != null) + lexNext.startCDATA (); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void endCDATA () throws SAXException { - if (lexNext != null) - lexNext.endCDATA (); + if (lexNext != null) + lexNext.endCDATA (); } /** @@ -742,8 +742,8 @@ public class EventFilter public void startEntity (String name) throws SAXException { - if (lexNext != null) - lexNext.startEntity (name); + if (lexNext != null) + lexNext.startEntity (name); } /** @@ -752,10 +752,10 @@ public class EventFilter public void endEntity (String name) throws SAXException { - if (lexNext != null) - lexNext.endEntity (name); + if (lexNext != null) + lexNext.endEntity (name); } - + // DECLARATION HANDLER DELEGATIONS @@ -764,33 +764,33 @@ public class EventFilter public void elementDecl (String name, String model) throws SAXException { - if (declNext != null) - declNext.elementDecl (name, model); + if (declNext != null) + declNext.elementDecl (name, model); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void attributeDecl (String eName, String aName, - String type, String mode, String value) + String type, String mode, String value) throws SAXException { - if (declNext != null) - declNext.attributeDecl (eName, aName, type, mode, value); + if (declNext != null) + declNext.attributeDecl (eName, aName, type, mode, value); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void externalEntityDecl (String name, - String publicId, String systemId) + String publicId, String systemId) throws SAXException { - if (declNext != null) - declNext.externalEntityDecl (name, publicId, systemId); + if (declNext != null) + declNext.externalEntityDecl (name, publicId, systemId); } /** <b>SAX2:</b> passes this callback to the next consumer, if any */ public void internalEntityDecl (String name, String value) throws SAXException { - if (declNext != null) - declNext.internalEntityDecl (name, value); + if (declNext != null) + declNext.internalEntityDecl (name, value); } } diff --git a/libjava/classpath/gnu/xml/pipeline/LinkFilter.java b/libjava/classpath/gnu/xml/pipeline/LinkFilter.java index ddb9fda..e11a5ec 100644 --- a/libjava/classpath/gnu/xml/pipeline/LinkFilter.java +++ b/libjava/classpath/gnu/xml/pipeline/LinkFilter.java @@ -1,4 +1,4 @@ -/* LinkFilter.java -- +/* LinkFilter.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -38,7 +38,7 @@ exception statement from your version. */ package gnu.xml.pipeline; import java.io.IOException; -import java.net.URL; +import java.net.URL; import java.util.Enumeration; import java.util.Vector; @@ -65,21 +65,21 @@ import org.xml.sax.SAXException; public class LinkFilter extends EventFilter { // for storing URIs - private Vector vector = new Vector (); + private Vector vector = new Vector (); - // struct for "full" link record (tbd) - // these for troubleshooting original source: - // original uri - // uri as resolved (base, relative, etc) - // URI of originating doc - // line # - // original element + attrs (img src, desc, etc) + // struct for "full" link record (tbd) + // these for troubleshooting original source: + // original uri + // uri as resolved (base, relative, etc) + // URI of originating doc + // line # + // original element + attrs (img src, desc, etc) - // XLink model of the link ... for inter-site pairups ? + // XLink model of the link ... for inter-site pairups ? - private String baseURI; + private String baseURI; - private boolean siteRestricted = false; + private boolean siteRestricted = false; // // XXX leverage blacklist info (like robots.txt) @@ -93,10 +93,10 @@ public class LinkFilter extends EventFilter * Constructs a new event filter, which collects links in private data * structure for later enumeration. */ - // constructor used by PipelineFactory + // constructor used by PipelineFactory public LinkFilter () { - super.setContentHandler (this); + super.setContentHandler (this); } @@ -105,11 +105,11 @@ public class LinkFilter extends EventFilter * structure for later enumeration and passes all events, unmodified, * to the next consumer. */ - // constructor used by PipelineFactory + // constructor used by PipelineFactory public LinkFilter (EventConsumer next) { - super (next); - super.setContentHandler (this); + super (next); + super.setContentHandler (this); } @@ -121,7 +121,7 @@ public class LinkFilter extends EventFilter */ public Enumeration getLinks () { - return vector.elements (); + return vector.elements (); } /** @@ -130,7 +130,7 @@ public class LinkFilter extends EventFilter */ public void removeAllLinks () { - vector = new Vector (); + vector = new Vector (); } @@ -138,84 +138,84 @@ public class LinkFilter extends EventFilter * Collects URIs for (X)HTML content from elements which hold them. */ public void startElement ( - String uri, - String localName, - String qName, - Attributes atts + String uri, + String localName, + String qName, + Attributes atts ) throws SAXException { - String link; - - // Recognize XHTML links. - if ("http://www.w3.org/1999/xhtml".equals (uri)) { - - if ("a".equals (localName) || "base".equals (localName) - || "area".equals (localName)) - link = atts.getValue ("href"); - else if ("iframe".equals (localName) || "frame".equals (localName)) - link = atts.getValue ("src"); - else if ("blockquote".equals (localName) || "q".equals (localName) - || "ins".equals (localName) || "del".equals (localName)) - link = atts.getValue ("cite"); - else - link = null; - link = maybeAddLink (link); - - // "base" modifies designated baseURI - if ("base".equals (localName) && link != null) - baseURI = link; - - if ("iframe".equals (localName) || "img".equals (localName)) - maybeAddLink (atts.getValue ("longdesc")); - } - - super.startElement (uri, localName, qName, atts); + String link; + + // Recognize XHTML links. + if ("http://www.w3.org/1999/xhtml".equals (uri)) { + + if ("a".equals (localName) || "base".equals (localName) + || "area".equals (localName)) + link = atts.getValue ("href"); + else if ("iframe".equals (localName) || "frame".equals (localName)) + link = atts.getValue ("src"); + else if ("blockquote".equals (localName) || "q".equals (localName) + || "ins".equals (localName) || "del".equals (localName)) + link = atts.getValue ("cite"); + else + link = null; + link = maybeAddLink (link); + + // "base" modifies designated baseURI + if ("base".equals (localName) && link != null) + baseURI = link; + + if ("iframe".equals (localName) || "img".equals (localName)) + maybeAddLink (atts.getValue ("longdesc")); + } + + super.startElement (uri, localName, qName, atts); } private String maybeAddLink (String link) { - int index; - - // ignore empty links and fragments inside docs - if (link == null) - return null; - if ((index = link.indexOf ("#")) >= 0) - link = link.substring (0, index); - if (link.equals ("")) - return null; - - try { - // get the real URI - URL base = new URL ((baseURI != null) - ? baseURI - : getDocumentLocator ().getSystemId ()); - URL url = new URL (base, link); - - link = url.toString (); - - // ignore duplicates - if (vector.contains (link)) - return link; - - // other than what "base" does, stick to original site: - if (siteRestricted) { - // don't switch protocols - if (!base.getProtocol ().equals (url.getProtocol ())) - return link; - // don't switch servers - if (base.getHost () != null - && !base.getHost ().equals (url.getHost ())) - return link; - } - - vector.addElement (link); - - return link; - - } catch (IOException e) { - // bad URLs we don't want - } - return null; + int index; + + // ignore empty links and fragments inside docs + if (link == null) + return null; + if ((index = link.indexOf ("#")) >= 0) + link = link.substring (0, index); + if (link.equals ("")) + return null; + + try { + // get the real URI + URL base = new URL ((baseURI != null) + ? baseURI + : getDocumentLocator ().getSystemId ()); + URL url = new URL (base, link); + + link = url.toString (); + + // ignore duplicates + if (vector.contains (link)) + return link; + + // other than what "base" does, stick to original site: + if (siteRestricted) { + // don't switch protocols + if (!base.getProtocol ().equals (url.getProtocol ())) + return link; + // don't switch servers + if (base.getHost () != null + && !base.getHost ().equals (url.getHost ())) + return link; + } + + vector.addElement (link); + + return link; + + } catch (IOException e) { + // bad URLs we don't want + } + return null; } /** @@ -224,8 +224,8 @@ public class LinkFilter extends EventFilter public void startDocument () throws SAXException { - if (getDocumentLocator () == null) - throw new SAXException ("no Locator!"); + if (getDocumentLocator () == null) + throw new SAXException ("no Locator!"); } /** @@ -236,7 +236,7 @@ public class LinkFilter extends EventFilter public void endDocument () throws SAXException { - baseURI = null; - super.endDocument (); + baseURI = null; + super.endDocument (); } } diff --git a/libjava/classpath/gnu/xml/pipeline/NSFilter.java b/libjava/classpath/gnu/xml/pipeline/NSFilter.java index db875e1..0fa4621 100644 --- a/libjava/classpath/gnu/xml/pipeline/NSFilter.java +++ b/libjava/classpath/gnu/xml/pipeline/NSFilter.java @@ -1,4 +1,4 @@ -/* NSFilter.java -- +/* NSFilter.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -56,23 +56,23 @@ import org.xml.sax.helpers.NamespaceSupport; * information using XML. There are various common ways that such data * gets discarded: <ul> * - * <li> By default, SAX2 parsers must discard the "xmlns*" - * attributes, and may also choose not to report properly prefixed - * names for elements or attributes. (Some parsers may support - * changing the <em>namespace-prefixes</em> value from the default - * to <em>true</em>, effectively eliminating the need to use this - * filter on their output.) + * <li> By default, SAX2 parsers must discard the "xmlns*" + * attributes, and may also choose not to report properly prefixed + * names for elements or attributes. (Some parsers may support + * changing the <em>namespace-prefixes</em> value from the default + * to <em>true</em>, effectively eliminating the need to use this + * filter on their output.) * - * <li> When event streams are generated from a DOM tree, they may - * have never have had prefixes or declarations for namespaces; or - * the existing prefixes or declarations may have been invalidated - * by structural modifications to that DOM tree. + * <li> When event streams are generated from a DOM tree, they may + * have never have had prefixes or declarations for namespaces; or + * the existing prefixes or declarations may have been invalidated + * by structural modifications to that DOM tree. * - * <li> Other software writing SAX event streams won't necessarily - * be worrying about prefix management, and so they will need to - * have a transparent solution for managing them. + * <li> Other software writing SAX event streams won't necessarily + * be worrying about prefix management, and so they will need to + * have a transparent solution for managing them. * - * </ul> + * </ul> * * <p> This filter uses a heuristic to choose the prefix to assign to any * particular name which wasn't already corectly prefixed. The associated @@ -91,55 +91,55 @@ import org.xml.sax.helpers.NamespaceSupport; */ public class NSFilter extends EventFilter { - private NamespaceSupport nsStack = new NamespaceSupport (); - private Stack elementStack = new Stack (); + private NamespaceSupport nsStack = new NamespaceSupport (); + private Stack elementStack = new Stack (); - private boolean pushedContext; - private String nsTemp [] = new String [3]; - private AttributesImpl attributes = new AttributesImpl (); - private boolean usedDefault; + private boolean pushedContext; + private String nsTemp [] = new String [3]; + private AttributesImpl attributes = new AttributesImpl (); + private boolean usedDefault; // gensymmed prefixes use this root name - private static final String prefixRoot = "prefix-"; + private static final String prefixRoot = "prefix-"; + - /** * Passes events through to the specified consumer, after first * processing them. * * @param next the next event consumer to receive events. */ - // constructor used by PipelineFactory + // constructor used by PipelineFactory public NSFilter (EventConsumer next) { - super (next); + super (next); - setContentHandler (this); + setContentHandler (this); } private void fatalError (String message) throws SAXException { - SAXParseException e; - ErrorHandler handler = getErrorHandler (); - Locator locator = getDocumentLocator (); - - if (locator == null) - e = new SAXParseException (message, null, null, -1, -1); - else - e = new SAXParseException (message, locator); - if (handler != null) - handler.fatalError (e); - throw e; + SAXParseException e; + ErrorHandler handler = getErrorHandler (); + Locator locator = getDocumentLocator (); + + if (locator == null) + e = new SAXParseException (message, null, null, -1, -1); + else + e = new SAXParseException (message, locator); + if (handler != null) + handler.fatalError (e); + throw e; } public void startDocument () throws SAXException { - elementStack.removeAllElements (); - nsStack.reset (); - pushedContext = false; - super.startDocument (); + elementStack.removeAllElements (); + nsStack.reset (); + pushedContext = false; + super.startDocument (); } /** @@ -151,176 +151,176 @@ public class NSFilter extends EventFilter public void startPrefixMapping (String prefix, String uri) throws SAXException { - if (pushedContext == false) { - nsStack.pushContext (); - pushedContext = true; - } - - // this check is awkward, but the paranoia prevents big trouble - for (Enumeration e = nsStack.getDeclaredPrefixes (); - e.hasMoreElements (); - /* NOP */ ) { - String declared = (String) e.nextElement (); - - if (!declared.equals (prefix)) - continue; - if (uri.equals (nsStack.getURI (prefix))) - return; - fatalError ("inconsistent binding for prefix '" + prefix - + "' ... " + uri + " (was " + nsStack.getURI (prefix) + ")"); - } - - if (!nsStack.declarePrefix (prefix, uri)) - fatalError ("illegal prefix declared: " + prefix); + if (pushedContext == false) { + nsStack.pushContext (); + pushedContext = true; + } + + // this check is awkward, but the paranoia prevents big trouble + for (Enumeration e = nsStack.getDeclaredPrefixes (); + e.hasMoreElements (); + /* NOP */ ) { + String declared = (String) e.nextElement (); + + if (!declared.equals (prefix)) + continue; + if (uri.equals (nsStack.getURI (prefix))) + return; + fatalError ("inconsistent binding for prefix '" + prefix + + "' ... " + uri + " (was " + nsStack.getURI (prefix) + ")"); + } + + if (!nsStack.declarePrefix (prefix, uri)) + fatalError ("illegal prefix declared: " + prefix); } private String fixName (String ns, String l, String name, boolean isAttr) throws SAXException { - if ("".equals (name) || name == null) { - name = l; - if ("".equals (name) || name == null) - fatalError ("empty/null name"); - } - - // can we correctly process the name as-is? - // handles "element scope" attribute names here. - if (nsStack.processName (name, nsTemp, isAttr) != null - && nsTemp [0].equals (ns) - ) { - return nsTemp [2]; - } - - // nope, gotta modify the name or declare a default mapping - int temp; - - // get rid of any current prefix - if ((temp = name.indexOf (':')) >= 0) { - name = name.substring (temp + 1); - - // ... maybe that's enough (use/prefer default namespace) ... - if (!isAttr && nsStack.processName (name, nsTemp, false) != null - && nsTemp [0].equals (ns) - ) { - return nsTemp [2]; - } - } - - // must we define and use the default/undefined prefix? - if ("".equals (ns)) { - if (isAttr) - fatalError ("processName bug"); - if (attributes.getIndex ("xmlns") != -1) - fatalError ("need to undefine default NS, but it's bound: " - + attributes.getValue ("xmlns")); - - nsStack.declarePrefix ("", ""); - attributes.addAttribute ("", "", "xmlns", "CDATA", ""); - return name; - } - - // is there at least one non-null prefix we can use? - for (Enumeration e = nsStack.getDeclaredPrefixes (); - e.hasMoreElements (); - /* NOP */) { - String prefix = (String) e.nextElement (); - String uri = nsStack.getURI (prefix); - - if (uri == null || !uri.equals (ns)) - continue; - return prefix + ":" + name; - } - - // no such luck. create a prefix name, declare it, use it. - for (temp = 0; temp >= 0; temp++) { - String prefix = prefixRoot + temp; - - if (nsStack.getURI (prefix) == null) { - nsStack.declarePrefix (prefix, ns); - attributes.addAttribute ("", "", "xmlns:" + prefix, - "CDATA", ns); - return prefix + ":" + name; - } - } - fatalError ("too many prefixes genned"); - // NOTREACHED - return null; + if ("".equals (name) || name == null) { + name = l; + if ("".equals (name) || name == null) + fatalError ("empty/null name"); + } + + // can we correctly process the name as-is? + // handles "element scope" attribute names here. + if (nsStack.processName (name, nsTemp, isAttr) != null + && nsTemp [0].equals (ns) + ) { + return nsTemp [2]; + } + + // nope, gotta modify the name or declare a default mapping + int temp; + + // get rid of any current prefix + if ((temp = name.indexOf (':')) >= 0) { + name = name.substring (temp + 1); + + // ... maybe that's enough (use/prefer default namespace) ... + if (!isAttr && nsStack.processName (name, nsTemp, false) != null + && nsTemp [0].equals (ns) + ) { + return nsTemp [2]; + } + } + + // must we define and use the default/undefined prefix? + if ("".equals (ns)) { + if (isAttr) + fatalError ("processName bug"); + if (attributes.getIndex ("xmlns") != -1) + fatalError ("need to undefine default NS, but it's bound: " + + attributes.getValue ("xmlns")); + + nsStack.declarePrefix ("", ""); + attributes.addAttribute ("", "", "xmlns", "CDATA", ""); + return name; + } + + // is there at least one non-null prefix we can use? + for (Enumeration e = nsStack.getDeclaredPrefixes (); + e.hasMoreElements (); + /* NOP */) { + String prefix = (String) e.nextElement (); + String uri = nsStack.getURI (prefix); + + if (uri == null || !uri.equals (ns)) + continue; + return prefix + ":" + name; + } + + // no such luck. create a prefix name, declare it, use it. + for (temp = 0; temp >= 0; temp++) { + String prefix = prefixRoot + temp; + + if (nsStack.getURI (prefix) == null) { + nsStack.declarePrefix (prefix, ns); + attributes.addAttribute ("", "", "xmlns:" + prefix, + "CDATA", ns); + return prefix + ":" + name; + } + } + fatalError ("too many prefixes genned"); + // NOTREACHED + return null; } public void startElement ( - String uri, String localName, - String qName, Attributes atts + String uri, String localName, + String qName, Attributes atts ) throws SAXException { - if (!pushedContext) - nsStack.pushContext (); - pushedContext = false; - - // make sure we have all NS declarations handy before we start - int length = atts.getLength (); - - for (int i = 0; i < length; i++) { - String aName = atts.getQName (i); - - if (!aName.startsWith ("xmlns")) - continue; - - String prefix; - - if ("xmlns".equals (aName)) - prefix = ""; - else if (aName.indexOf (':') == 5) - prefix = aName.substring (6); - else // "xmlnsfoo" etc. - continue; - startPrefixMapping (prefix, atts.getValue (i)); - } - - // put namespace decls at the start of our regenned attlist - attributes.clear (); - for (Enumeration e = nsStack.getDeclaredPrefixes (); - e.hasMoreElements (); - /* NOP */) { - String prefix = (String) e.nextElement (); - - attributes.addAttribute ("", "", - ("".equals (prefix) - ? "xmlns" - : "xmlns:" + prefix), - "CDATA", - nsStack.getURI (prefix)); - } - - // name fixups: element, then attributes. - // fixName may declare a new prefix or, for the element, - // redeclare the default (if element name needs it). - qName = fixName (uri, localName, qName, false); - - for (int i = 0; i < length; i++) { - String aName = atts.getQName (i); - String aNS = atts.getURI (i); - String aLocal = atts.getLocalName (i); - String aType = atts.getType (i); - String aValue = atts.getValue (i); - - if (aName.startsWith ("xmlns")) - continue; - aName = fixName (aNS, aLocal, aName, true); - attributes.addAttribute (aNS, aLocal, aName, aType, aValue); - } - - elementStack.push (qName); - - // pass event along, with cleaned-up names and decls. - super.startElement (uri, localName, qName, attributes); + if (!pushedContext) + nsStack.pushContext (); + pushedContext = false; + + // make sure we have all NS declarations handy before we start + int length = atts.getLength (); + + for (int i = 0; i < length; i++) { + String aName = atts.getQName (i); + + if (!aName.startsWith ("xmlns")) + continue; + + String prefix; + + if ("xmlns".equals (aName)) + prefix = ""; + else if (aName.indexOf (':') == 5) + prefix = aName.substring (6); + else // "xmlnsfoo" etc. + continue; + startPrefixMapping (prefix, atts.getValue (i)); + } + + // put namespace decls at the start of our regenned attlist + attributes.clear (); + for (Enumeration e = nsStack.getDeclaredPrefixes (); + e.hasMoreElements (); + /* NOP */) { + String prefix = (String) e.nextElement (); + + attributes.addAttribute ("", "", + ("".equals (prefix) + ? "xmlns" + : "xmlns:" + prefix), + "CDATA", + nsStack.getURI (prefix)); + } + + // name fixups: element, then attributes. + // fixName may declare a new prefix or, for the element, + // redeclare the default (if element name needs it). + qName = fixName (uri, localName, qName, false); + + for (int i = 0; i < length; i++) { + String aName = atts.getQName (i); + String aNS = atts.getURI (i); + String aLocal = atts.getLocalName (i); + String aType = atts.getType (i); + String aValue = atts.getValue (i); + + if (aName.startsWith ("xmlns")) + continue; + aName = fixName (aNS, aLocal, aName, true); + attributes.addAttribute (aNS, aLocal, aName, aType, aValue); + } + + elementStack.push (qName); + + // pass event along, with cleaned-up names and decls. + super.startElement (uri, localName, qName, attributes); } public void endElement (String uri, String localName, String qName) throws SAXException { - nsStack.popContext (); - qName = (String) elementStack.pop (); - super.endElement (uri, localName, qName); + nsStack.popContext (); + qName = (String) elementStack.pop (); + super.endElement (uri, localName, qName); } /** @@ -330,12 +330,12 @@ public class NSFilter extends EventFilter */ public void endPrefixMapping (String prefix) throws SAXException - { } + { } public void endDocument () throws SAXException { - elementStack.removeAllElements (); - nsStack.reset (); - super.endDocument (); + elementStack.removeAllElements (); + nsStack.reset (); + super.endDocument (); } } diff --git a/libjava/classpath/gnu/xml/pipeline/PipelineFactory.java b/libjava/classpath/gnu/xml/pipeline/PipelineFactory.java index f88ab16..c2adab0 100644 --- a/libjava/classpath/gnu/xml/pipeline/PipelineFactory.java +++ b/libjava/classpath/gnu/xml/pipeline/PipelineFactory.java @@ -1,4 +1,4 @@ -/* PipelineFactory.java -- +/* PipelineFactory.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -69,120 +69,120 @@ import org.xml.sax.ext.*; * The stage identifiers are either class names, or are one of the following * short identifiers built into this class. (Most of these identifiers are * no more than aliases for classes.) The built-in identifiers include:</p> - + <table border="1" cellpadding="3" cellspacing="0"> <tr bgcolor="#ccccff" class="TableHeadingColor"> - <th align="center" width="5%">Stage</th> - <th align="center" width="9%">Parameter</th> - <th align="center" width="1%">Terminus</th> - <th align="center">Description</th> + <th align="center" width="5%">Stage</th> + <th align="center" width="9%">Parameter</th> + <th align="center" width="1%">Terminus</th> + <th align="center">Description</th> </tr> <tr valign="top" align="center"> - <td><a href="../dom/Consumer.html">dom</a></td> - <td><em>none</em></td> - <td> yes </td> - <td align="left"> Applications code can access a DOM Document built - from the input event stream. When used as a filter, this buffers - data up to an <em>endDocument</em> call, and then uses a DOM parser - to report everything that has been recorded (which can easily be - less than what was reported to it). </td> + <td><a href="../dom/Consumer.html">dom</a></td> + <td><em>none</em></td> + <td> yes </td> + <td align="left"> Applications code can access a DOM Document built + from the input event stream. When used as a filter, this buffers + data up to an <em>endDocument</em> call, and then uses a DOM parser + to report everything that has been recorded (which can easily be + less than what was reported to it). </td> </tr> <tr valign="top" align="center"> - <td><a href="NSFilter.html">nsfix</a></td> - <td><em>none</em></td> - <td>no</td> - <td align="left">This stage ensures that the XML element and attribute - names in its output use namespace prefixes and declarations correctly. - That is, so that they match the "Namespace plus LocalName" naming data - with which each XML element and attribute is already associated. </td> + <td><a href="NSFilter.html">nsfix</a></td> + <td><em>none</em></td> + <td>no</td> + <td align="left">This stage ensures that the XML element and attribute + names in its output use namespace prefixes and declarations correctly. + That is, so that they match the "Namespace plus LocalName" naming data + with which each XML element and attribute is already associated. </td> </tr> <tr valign="top" align="center"> - <td><a href="EventFilter.html">null</a></td> - <td><em>none</em></td> - <td>yes</td> - <td align="left">This stage ignores all input event data.</td> + <td><a href="EventFilter.html">null</a></td> + <td><em>none</em></td> + <td>yes</td> + <td align="left">This stage ignores all input event data.</td> </tr> <tr valign="top" align="center"> - <td><a href="CallFilter.html">server</a></td> - <td><em>required</em><br> server URL </td> - <td>no</td> - <td align="left">Sends its input as XML request to a remote server, - normally a web application server using the HTTP or HTTPS protocols. - The output of this stage is the parsed response from that server.</td> + <td><a href="CallFilter.html">server</a></td> + <td><em>required</em><br> server URL </td> + <td>no</td> + <td align="left">Sends its input as XML request to a remote server, + normally a web application server using the HTTP or HTTPS protocols. + The output of this stage is the parsed response from that server.</td> </tr> <tr valign="top" align="center"> - <td><a href="TeeConsumer.html">tee</a></td> - <td><em>required</em><br> first pipeline</td> - <td>no</td> - <td align="left">This sends its events down two paths; its parameter - is a pipeline descriptor for the first path, and the second path - is the output of this stage.</td> + <td><a href="TeeConsumer.html">tee</a></td> + <td><em>required</em><br> first pipeline</td> + <td>no</td> + <td align="left">This sends its events down two paths; its parameter + is a pipeline descriptor for the first path, and the second path + is the output of this stage.</td> </tr> <tr valign="top" align="center"> - <td><a href="ValidationConsumer.html">validate</a></td> - <td><em>none</em></td> - <td>yes</td> - <td align="left">This checks for validity errors, and reports them - through its error handler. The input must include declaration events - and some lexical events. </td> + <td><a href="ValidationConsumer.html">validate</a></td> + <td><em>none</em></td> + <td>yes</td> + <td align="left">This checks for validity errors, and reports them + through its error handler. The input must include declaration events + and some lexical events. </td> </tr> <tr valign="top" align="center"> - <td><a href="WellFormednessFilter.html">wf</a></td> - <td><em>none</em></td> - <td>yes</td> - <td align="left"> This class provides some basic "well formedness" - tests on the input event stream, and reports a fatal error if any - of them fail. One example: start/end calls for elements must match. - No SAX parser is permitted to produce malformed output, but other - components can easily do so.</td> + <td><a href="WellFormednessFilter.html">wf</a></td> + <td><em>none</em></td> + <td>yes</td> + <td align="left"> This class provides some basic "well formedness" + tests on the input event stream, and reports a fatal error if any + of them fail. One example: start/end calls for elements must match. + No SAX parser is permitted to produce malformed output, but other + components can easily do so.</td> </tr> <tr valign="top" align="center"> - <td>write</td> - <td><em>required</em><br> "stdout", "stderr", or filename</td> - <td>yes</td> - <td align="left"> Writes its input to the specified output, as pretty - printed XML text encoded using UTF-8. Input events must be well - formed and "namespace fixed", else the output won't be XML (or possibly - namespace) conformant. The symbolic names represent - <em>System.out</em> and <em>System.err</em> respectively; names must - correspond to files which don't yet exist.</td> + <td>write</td> + <td><em>required</em><br> "stdout", "stderr", or filename</td> + <td>yes</td> + <td align="left"> Writes its input to the specified output, as pretty + printed XML text encoded using UTF-8. Input events must be well + formed and "namespace fixed", else the output won't be XML (or possibly + namespace) conformant. The symbolic names represent + <em>System.out</em> and <em>System.err</em> respectively; names must + correspond to files which don't yet exist.</td> </tr> <tr valign="top" align="center"> - <td>xhtml</td> - <td><em>required</em><br> "stdout", "stderr", or filename</td> - <td>yes</td> - <td align="left"> Like <em>write</em> (above), except that XHTML rules - are followed. The XHTML 1.0 Transitional document type is declared, - and only ASCII characters are written (for interoperability). Other - characters are written as entity or character references; the text is - pretty printed.</td> + <td>xhtml</td> + <td><em>required</em><br> "stdout", "stderr", or filename</td> + <td>yes</td> + <td align="left"> Like <em>write</em> (above), except that XHTML rules + are followed. The XHTML 1.0 Transitional document type is declared, + and only ASCII characters are written (for interoperability). Other + characters are written as entity or character references; the text is + pretty printed.</td> </tr> <tr valign="top" align="center"> - <td><a href="XIncludeFilter.html">xinclude</a></td> - <td><em>none</em></td> - <td>no</td> - <td align="left">This stage handles XInclude processing. - This is like entity inclusion, except that the included content - is declared in-line rather than in the DTD at the beginning of - a document. - </td> + <td><a href="XIncludeFilter.html">xinclude</a></td> + <td><em>none</em></td> + <td>no</td> + <td align="left">This stage handles XInclude processing. + This is like entity inclusion, except that the included content + is declared in-line rather than in the DTD at the beginning of + a document. + </td> </tr> <tr valign="top" align="center"> - <td><a href="XsltFilter.html">xslt</a></td> - <td><em>required</em><br> XSLT stylesheet URI</td> - <td>no</td> - <td align="left">This stage handles XSLT transformation - according to a stylesheet. - The implementation of the transformation may not actually - stream data, although if such an XSLT engine is in use - then that can happen. - </td> + <td><a href="XsltFilter.html">xslt</a></td> + <td><em>required</em><br> XSLT stylesheet URI</td> + <td>no</td> + <td align="left">This stage handles XSLT transformation + according to a stylesheet. + The implementation of the transformation may not actually + stream data, although if such an XSLT engine is in use + then that can happen. + </td> </tr> </table> - + * <p> Note that {@link EventFilter#bind} can automatically eliminate * some filters by setting SAX2 parser features appropriately. This means * that you can routinely put filters like "nsfix", "validate", or "wf" at the @@ -200,7 +200,7 @@ public class PipelineFactory public static EventConsumer createPipeline (String description) throws IOException { - return createPipeline (description, null); + return createPipeline (description, null); } /** @@ -211,25 +211,25 @@ public class PipelineFactory * segments with easily configured ones. */ public static EventConsumer createPipeline ( - String description, - EventConsumer next + String description, + EventConsumer next ) throws IOException { - // tokens are (for now) what's separated by whitespace; - // very easy to parse, but IDs never have spaces. + // tokens are (for now) what's separated by whitespace; + // very easy to parse, but IDs never have spaces. - StringTokenizer tokenizer; - String tokens []; + StringTokenizer tokenizer; + String tokens []; - tokenizer = new StringTokenizer (description); - tokens = new String [tokenizer.countTokens ()]; - for (int i = 0; i < tokens.length; i++) - tokens [i] = tokenizer.nextToken (); + tokenizer = new StringTokenizer (description); + tokens = new String [tokenizer.countTokens ()]; + for (int i = 0; i < tokens.length; i++) + tokens [i] = tokenizer.nextToken (); - PipelineFactory factory = new PipelineFactory (); - Pipeline pipeline = factory.parsePipeline (tokens, next); + PipelineFactory factory = new PipelineFactory (); + Pipeline pipeline = factory.parsePipeline (tokens, next); - return pipeline.createPipeline (); + return pipeline.createPipeline (); } @@ -242,70 +242,70 @@ public class PipelineFactory * predefined aliases) left and right parenthesis, and the vertical bar. */ public static EventConsumer createPipeline ( - String tokens [], - EventConsumer next + String tokens [], + EventConsumer next ) throws IOException { - PipelineFactory factory = new PipelineFactory (); - Pipeline pipeline = factory.parsePipeline (tokens, next); + PipelineFactory factory = new PipelineFactory (); + Pipeline pipeline = factory.parsePipeline (tokens, next); - return pipeline.createPipeline (); + return pipeline.createPipeline (); } - private String tokens []; - private int index; + private String tokens []; + private int index; private Pipeline parsePipeline (String toks [], EventConsumer next) { - tokens = toks; - index = 0; - - Pipeline retval = parsePipeline (next); - - if (index != toks.length) - throw new ArrayIndexOutOfBoundsException ( - "extra token: " + tokens [index]); - return retval; + tokens = toks; + index = 0; + + Pipeline retval = parsePipeline (next); + + if (index != toks.length) + throw new ArrayIndexOutOfBoundsException ( + "extra token: " + tokens [index]); + return retval; } // pipeline ::= stage | stage '|' pipeline private Pipeline parsePipeline (EventConsumer next) { - Pipeline retval = new Pipeline (parseStage ()); - - // minimal pipelines: "stage" and "... | id" - if (index > (tokens.length - 2) - || !"|".equals (tokens [index]) - ) { - retval.next = next; - return retval; - } - index++; - retval.rest = parsePipeline (next); - return retval; + Pipeline retval = new Pipeline (parseStage ()); + + // minimal pipelines: "stage" and "... | id" + if (index > (tokens.length - 2) + || !"|".equals (tokens [index]) + ) { + retval.next = next; + return retval; + } + index++; + retval.rest = parsePipeline (next); + return retval; } // stage ::= id | id '(' pipeline ')' private Stage parseStage () { - Stage retval = new Stage (tokens [index++]); - - // minimal stages: "id" and "id ( id )" - if (index > (tokens.length - 2) - || !"(".equals (tokens [index]) /*)*/ - ) - return retval; - - index++; - retval.param = parsePipeline (null); - if (index >= tokens.length) - throw new ArrayIndexOutOfBoundsException ( - "missing right paren"); - if (/*(*/ !")".equals (tokens [index++])) - throw new ArrayIndexOutOfBoundsException ( - "required right paren, not: " + tokens [index - 1]); - return retval; + Stage retval = new Stage (tokens [index++]); + + // minimal stages: "id" and "id ( id )" + if (index > (tokens.length - 2) + || !"(".equals (tokens [index]) /*)*/ + ) + return retval; + + index++; + retval.param = parsePipeline (null); + if (index >= tokens.length) + throw new ArrayIndexOutOfBoundsException ( + "missing right paren"); + if (/*(*/ !")".equals (tokens [index++])) + throw new ArrayIndexOutOfBoundsException ( + "required right paren, not: " + tokens [index - 1]); + return retval; } @@ -313,12 +313,12 @@ public class PipelineFactory // these classes obey the conventions for constructors, so they're // only built in to this table of shortnames // - // - filter (one or two types of arglist) - // * last constructor is 'next' element - // * optional (first) string parameter + // - filter (one or two types of arglist) + // * last constructor is 'next' element + // * optional (first) string parameter // - // - terminus (one or types of arglist) - // * optional (only) string parameter + // - terminus (one or types of arglist) + // * optional (only) string parameter // // terminus stages are transformed into filters if needed, by // creating a "tee". filter stages aren't turned to terminus @@ -326,397 +326,397 @@ public class PipelineFactory // terminus explicitly. // private static final String builtinStages [][] = { - { "dom", "gnu.xml.dom.Consumer" }, - { "nsfix", "gnu.xml.pipeline.NSFilter" }, - { "null", "gnu.xml.pipeline.EventFilter" }, - { "server", "gnu.xml.pipeline.CallFilter" }, - { "tee", "gnu.xml.pipeline.TeeConsumer" }, - { "validate", "gnu.xml.pipeline.ValidationConsumer" }, - { "wf", "gnu.xml.pipeline.WellFormednessFilter" }, - { "xinclude", "gnu.xml.pipeline.XIncludeFilter" }, - { "xslt", "gnu.xml.pipeline.XsltFilter" }, + { "dom", "gnu.xml.dom.Consumer" }, + { "nsfix", "gnu.xml.pipeline.NSFilter" }, + { "null", "gnu.xml.pipeline.EventFilter" }, + { "server", "gnu.xml.pipeline.CallFilter" }, + { "tee", "gnu.xml.pipeline.TeeConsumer" }, + { "validate", "gnu.xml.pipeline.ValidationConsumer" }, + { "wf", "gnu.xml.pipeline.WellFormednessFilter" }, + { "xinclude", "gnu.xml.pipeline.XIncludeFilter" }, + { "xslt", "gnu.xml.pipeline.XsltFilter" }, // XXX want: option for validate, to preload external part of a DTD - // xhtml, write ... nyet generic-ready + // xhtml, write ... nyet generic-ready }; private static class Stage { - String id; - Pipeline param; - - Stage (String name) - { id = name; } - - public String toString () - { - if (param == null) - return id; - return id + " ( " + param + " )"; - } - - private void fail (String message) - throws IOException - { - throw new IOException ("in '" + id - + "' stage of pipeline, " + message); - } - - EventConsumer createStage (EventConsumer next) - throws IOException - { - String name = id; - - // most builtins are just class aliases - for (int i = 0; i < builtinStages.length; i++) { - if (id.equals (builtinStages [i][0])) { - name = builtinStages [i][1]; - break; - } - } - - // Save output as XML or XHTML text - if ("write".equals (name) || "xhtml".equals (name)) { - String filename; - boolean isXhtml = "xhtml".equals (name); - OutputStream out = null; - TextConsumer consumer; - - if (param == null) - fail ("parameter is required"); - - filename = param.toString (); - if ("stdout".equals (filename)) - out = System.out; - else if ("stderr".equals (filename)) - out = System.err; - else { - File f = new File (filename); + String id; + Pipeline param; + + Stage (String name) + { id = name; } + + public String toString () + { + if (param == null) + return id; + return id + " ( " + param + " )"; + } + + private void fail (String message) + throws IOException + { + throw new IOException ("in '" + id + + "' stage of pipeline, " + message); + } + + EventConsumer createStage (EventConsumer next) + throws IOException + { + String name = id; + + // most builtins are just class aliases + for (int i = 0; i < builtinStages.length; i++) { + if (id.equals (builtinStages [i][0])) { + name = builtinStages [i][1]; + break; + } + } + + // Save output as XML or XHTML text + if ("write".equals (name) || "xhtml".equals (name)) { + String filename; + boolean isXhtml = "xhtml".equals (name); + OutputStream out = null; + TextConsumer consumer; + + if (param == null) + fail ("parameter is required"); + + filename = param.toString (); + if ("stdout".equals (filename)) + out = System.out; + else if ("stderr".equals (filename)) + out = System.err; + else { + File f = new File (filename); /* - if (!f.isAbsolute ()) - fail ("require absolute file paths"); + if (!f.isAbsolute ()) + fail ("require absolute file paths"); */ - if (f.exists ()) - fail ("file already exists: " + f.getName ()); + if (f.exists ()) + fail ("file already exists: " + f.getName ()); // XXX this races against the existence test - out = new FileOutputStream (f); - } - - if (!isXhtml) - consumer = new TextConsumer (out); - else - consumer = new TextConsumer ( - new OutputStreamWriter (out, "8859_1"), - true); - - consumer.setPrettyPrinting (true); - if (next == null) - return consumer; - return new TeeConsumer (consumer, next); - - } else { - // - // Here go all the builtins that are just aliases for - // classes, and all stage IDs that started out as such - // class names. The following logic relies on several - // documented conventions for constructor invocation. - // - String msg = null; - - try { - Class klass = Class.forName (name); - Class argTypes [] = null; - Constructor constructor = null; - boolean filter = false; - Object params [] = null; - Object obj = null; - - // do we need a filter stage? - if (next != null) { - // "next" consumer is always passed, with - // or without the optional string param - if (param == null) { - argTypes = new Class [1]; - argTypes [0] = EventConsumer.class; - - params = new Object [1]; - params [0] = next; - - msg = "no-param filter"; - } else { - argTypes = new Class [2]; - argTypes [0] = String.class; - argTypes [1] = EventConsumer.class; - - params = new Object [2]; - params [0] = param.toString (); - params [1] = next; - - msg = "one-param filter"; - } - - - try { - constructor = klass.getConstructor (argTypes); - } catch (NoSuchMethodException e) { - // try creating a filter from a - // terminus and a tee - filter = true; - msg += " built from "; - } - } - - // build from a terminus stage, with or - // without the optional string param - if (constructor == null) { - String tmp; - - if (param == null) { - argTypes = new Class [0]; - params = new Object [0]; - - tmp = "no-param terminus"; - } else { - argTypes = new Class [1]; - argTypes [0] = String.class; - - params = new Object [1]; - params [0] = param.toString (); - - tmp = "one-param terminus"; - } - if (msg == null) - msg = tmp; - else - msg += tmp; - constructor = klass.getConstructor (argTypes); - // NOT creating terminus by dead-ending - // filters ... users should think about - // that one, something's likely wrong - } - - obj = constructor.newInstance (params); - - // return EventConsumers directly, perhaps after - // turning them into a filter - if (obj instanceof EventConsumer) { - if (filter) - return new TeeConsumer ((EventConsumer) obj, next); - return (EventConsumer) obj; - } - - // if it's not a handler, it's an error - // we can wrap handlers in a filter - EventFilter retval = new EventFilter (); - boolean updated = false; - - if (obj instanceof ContentHandler) { - retval.setContentHandler ((ContentHandler) obj); - updated = true; - } - if (obj instanceof DTDHandler) { - retval.setDTDHandler ((DTDHandler) obj); - updated = true; - } - if (obj instanceof LexicalHandler) { - retval.setProperty ( - EventFilter.PROPERTY_URI + "lexical-handler", - obj); - updated = true; - } - if (obj instanceof DeclHandler) { - retval.setProperty ( - EventFilter.PROPERTY_URI + "declaration-handler", - obj); - updated = true; - } - - if (!updated) - fail ("class is neither Consumer nor Handler"); - - if (filter) - return new TeeConsumer (retval, next); - return retval; - - } catch (IOException e) { - throw e; - - } catch (NoSuchMethodException e) { - fail (name + " constructor missing -- " + msg); - - } catch (ClassNotFoundException e) { - fail (name + " class not found"); - - } catch (Exception e) { - // e.printStackTrace (); - fail ("stage not available: " + e.getMessage ()); - } - } - // NOTREACHED - return null; - } + out = new FileOutputStream (f); + } + + if (!isXhtml) + consumer = new TextConsumer (out); + else + consumer = new TextConsumer ( + new OutputStreamWriter (out, "8859_1"), + true); + + consumer.setPrettyPrinting (true); + if (next == null) + return consumer; + return new TeeConsumer (consumer, next); + + } else { + // + // Here go all the builtins that are just aliases for + // classes, and all stage IDs that started out as such + // class names. The following logic relies on several + // documented conventions for constructor invocation. + // + String msg = null; + + try { + Class klass = Class.forName (name); + Class argTypes [] = null; + Constructor constructor = null; + boolean filter = false; + Object params [] = null; + Object obj = null; + + // do we need a filter stage? + if (next != null) { + // "next" consumer is always passed, with + // or without the optional string param + if (param == null) { + argTypes = new Class [1]; + argTypes [0] = EventConsumer.class; + + params = new Object [1]; + params [0] = next; + + msg = "no-param filter"; + } else { + argTypes = new Class [2]; + argTypes [0] = String.class; + argTypes [1] = EventConsumer.class; + + params = new Object [2]; + params [0] = param.toString (); + params [1] = next; + + msg = "one-param filter"; + } + + + try { + constructor = klass.getConstructor (argTypes); + } catch (NoSuchMethodException e) { + // try creating a filter from a + // terminus and a tee + filter = true; + msg += " built from "; + } + } + + // build from a terminus stage, with or + // without the optional string param + if (constructor == null) { + String tmp; + + if (param == null) { + argTypes = new Class [0]; + params = new Object [0]; + + tmp = "no-param terminus"; + } else { + argTypes = new Class [1]; + argTypes [0] = String.class; + + params = new Object [1]; + params [0] = param.toString (); + + tmp = "one-param terminus"; + } + if (msg == null) + msg = tmp; + else + msg += tmp; + constructor = klass.getConstructor (argTypes); + // NOT creating terminus by dead-ending + // filters ... users should think about + // that one, something's likely wrong + } + + obj = constructor.newInstance (params); + + // return EventConsumers directly, perhaps after + // turning them into a filter + if (obj instanceof EventConsumer) { + if (filter) + return new TeeConsumer ((EventConsumer) obj, next); + return (EventConsumer) obj; + } + + // if it's not a handler, it's an error + // we can wrap handlers in a filter + EventFilter retval = new EventFilter (); + boolean updated = false; + + if (obj instanceof ContentHandler) { + retval.setContentHandler ((ContentHandler) obj); + updated = true; + } + if (obj instanceof DTDHandler) { + retval.setDTDHandler ((DTDHandler) obj); + updated = true; + } + if (obj instanceof LexicalHandler) { + retval.setProperty ( + EventFilter.PROPERTY_URI + "lexical-handler", + obj); + updated = true; + } + if (obj instanceof DeclHandler) { + retval.setProperty ( + EventFilter.PROPERTY_URI + "declaration-handler", + obj); + updated = true; + } + + if (!updated) + fail ("class is neither Consumer nor Handler"); + + if (filter) + return new TeeConsumer (retval, next); + return retval; + + } catch (IOException e) { + throw e; + + } catch (NoSuchMethodException e) { + fail (name + " constructor missing -- " + msg); + + } catch (ClassNotFoundException e) { + fail (name + " class not found"); + + } catch (Exception e) { + // e.printStackTrace (); + fail ("stage not available: " + e.getMessage ()); + } + } + // NOTREACHED + return null; + } } private static class Pipeline { - Stage stage; - - // rest may be null - Pipeline rest; - EventConsumer next; - - Pipeline (Stage s) - { stage = s; } - - public String toString () - { - if (rest == null && next == null) - return stage.toString (); - if (rest != null) - return stage + " | " + rest; - throw new IllegalArgumentException ("next"); - } - - EventConsumer createPipeline () - throws IOException - { - if (next == null) { - if (rest == null) - next = stage.createStage (null); - else - next = stage.createStage (rest.createPipeline ()); - } - return next; - } + Stage stage; + + // rest may be null + Pipeline rest; + EventConsumer next; + + Pipeline (Stage s) + { stage = s; } + + public String toString () + { + if (rest == null && next == null) + return stage.toString (); + if (rest != null) + return stage + " | " + rest; + throw new IllegalArgumentException ("next"); + } + + EventConsumer createPipeline () + throws IOException + { + if (next == null) { + if (rest == null) + next = stage.createStage (null); + else + next = stage.createStage (rest.createPipeline ()); + } + return next; + } } /* public static void main (String argv []) { - try { - // three basic terminus cases - createPipeline ("null"); - createPipeline ("validate"); - createPipeline ("write ( stdout )"); - - // four basic filters - createPipeline ("nsfix | write ( stderr )"); - createPipeline ("wf | null"); - createPipeline ("null | null"); - createPipeline ( + try { + // three basic terminus cases + createPipeline ("null"); + createPipeline ("validate"); + createPipeline ("write ( stdout )"); + + // four basic filters + createPipeline ("nsfix | write ( stderr )"); + createPipeline ("wf | null"); + createPipeline ("null | null"); + createPipeline ( "call ( http://www.example.com/services/xml-1a ) | xhtml ( stdout )"); - // tee junctions - createPipeline ("tee ( validate ) | write ( stdout )"); - createPipeline ("tee ( nsfix | write ( stdout ) ) | validate"); - - // longer pipeline - createPipeline ("nsfix | tee ( validate ) | write ( stdout )"); - createPipeline ( - "null | wf | nsfix | tee ( validate ) | write ( stdout )"); - - // try some parsing error cases - try { - createPipeline ("null ("); // extra token '(' - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - - try { - createPipeline ("nsfix |"); // extra token '|' - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - - try { - createPipeline ("xhtml ( foo"); // missing right paren - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - - try { - createPipeline ("xhtml ( foo bar"); // required right paren - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - - try { - createPipeline ("tee ( nsfix | validate");// missing right paren - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - - // try some construction error cases - - try { - createPipeline ("call"); // missing param - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - try { - createPipeline ("call ( foobar )"); // broken param - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - try { - createPipeline ("nsfix ( foobar )"); // illegal param - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - try { - createPipeline ("null ( foobar )"); // illegal param - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - try { - createPipeline ("wf ( foobar )"); // illegal param - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - try { - createPipeline ("xhtml ( foobar.html )"); - new File ("foobar.html").delete (); - // now supported - } catch (Exception e) { - System.err.println ("** err: " + e.getMessage ()); } - try { - createPipeline ("xhtml"); // missing param - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - try { - createPipeline ("write ( stdout ) | null"); // nonterminal - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - try { - createPipeline ("validate | null"); - // now supported - } catch (Exception e) { - System.err.println ("** err: " + e.getMessage ()); } - try { - createPipeline ("validate ( foo )"); // illegal param - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - try { - createPipeline ("tee"); // missing param - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - try { - // only builtins so far - createPipeline ("com.example.xml.FilterClass"); - System.err.println ("** didn't report error"); - } catch (Exception e) { - System.err.println ("== err: " + e.getMessage ()); } - - } catch (Exception e) { - e.printStackTrace (); - } + // tee junctions + createPipeline ("tee ( validate ) | write ( stdout )"); + createPipeline ("tee ( nsfix | write ( stdout ) ) | validate"); + + // longer pipeline + createPipeline ("nsfix | tee ( validate ) | write ( stdout )"); + createPipeline ( + "null | wf | nsfix | tee ( validate ) | write ( stdout )"); + + // try some parsing error cases + try { + createPipeline ("null ("); // extra token '(' + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + + try { + createPipeline ("nsfix |"); // extra token '|' + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + + try { + createPipeline ("xhtml ( foo"); // missing right paren + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + + try { + createPipeline ("xhtml ( foo bar"); // required right paren + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + + try { + createPipeline ("tee ( nsfix | validate");// missing right paren + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + + // try some construction error cases + + try { + createPipeline ("call"); // missing param + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + try { + createPipeline ("call ( foobar )"); // broken param + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + try { + createPipeline ("nsfix ( foobar )"); // illegal param + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + try { + createPipeline ("null ( foobar )"); // illegal param + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + try { + createPipeline ("wf ( foobar )"); // illegal param + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + try { + createPipeline ("xhtml ( foobar.html )"); + new File ("foobar.html").delete (); + // now supported + } catch (Exception e) { + System.err.println ("** err: " + e.getMessage ()); } + try { + createPipeline ("xhtml"); // missing param + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + try { + createPipeline ("write ( stdout ) | null"); // nonterminal + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + try { + createPipeline ("validate | null"); + // now supported + } catch (Exception e) { + System.err.println ("** err: " + e.getMessage ()); } + try { + createPipeline ("validate ( foo )"); // illegal param + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + try { + createPipeline ("tee"); // missing param + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + try { + // only builtins so far + createPipeline ("com.example.xml.FilterClass"); + System.err.println ("** didn't report error"); + } catch (Exception e) { + System.err.println ("== err: " + e.getMessage ()); } + + } catch (Exception e) { + e.printStackTrace (); + } } /**/ diff --git a/libjava/classpath/gnu/xml/pipeline/TeeConsumer.java b/libjava/classpath/gnu/xml/pipeline/TeeConsumer.java index 8186de4..3ac86057 100644 --- a/libjava/classpath/gnu/xml/pipeline/TeeConsumer.java +++ b/libjava/classpath/gnu/xml/pipeline/TeeConsumer.java @@ -1,4 +1,4 @@ -/* TeeConsumer.java -- +/* TeeConsumer.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -68,16 +68,16 @@ import org.xml.sax.ext.LexicalHandler; * @author David Brownell */ final public class TeeConsumer - implements EventConsumer, - ContentHandler, DTDHandler, - LexicalHandler,DeclHandler + implements EventConsumer, + ContentHandler, DTDHandler, + LexicalHandler,DeclHandler { - private EventConsumer first, rest; + private EventConsumer first, rest; // cached to minimize time overhead - private ContentHandler docFirst, docRest; - private DeclHandler declFirst, declRest; - private LexicalHandler lexFirst, lexRest; + private ContentHandler docFirst, docRest; + private DeclHandler declFirst, declRest; + private LexicalHandler lexFirst, lexRest; /** @@ -91,39 +91,39 @@ final public class TeeConsumer */ public TeeConsumer (EventConsumer car, EventConsumer cdr) { - if (car == null || cdr == null) - throw new NullPointerException (); - first = car; - rest = cdr; - - // - // Cache the handlers. - // - docFirst = first.getContentHandler (); - docRest = rest.getContentHandler (); - // DTD handler isn't cached (rarely needed) - - try { - declFirst = null; - declFirst = (DeclHandler) first.getProperty ( - EventFilter.DECL_HANDLER); - } catch (SAXException e) {} - try { - declRest = null; - declRest = (DeclHandler) rest.getProperty ( - EventFilter.DECL_HANDLER); - } catch (SAXException e) {} - - try { - lexFirst = null; - lexFirst = (LexicalHandler) first.getProperty ( - EventFilter.LEXICAL_HANDLER); - } catch (SAXException e) {} - try { - lexRest = null; - lexRest = (LexicalHandler) rest.getProperty ( - EventFilter.LEXICAL_HANDLER); - } catch (SAXException e) {} + if (car == null || cdr == null) + throw new NullPointerException (); + first = car; + rest = cdr; + + // + // Cache the handlers. + // + docFirst = first.getContentHandler (); + docRest = rest.getContentHandler (); + // DTD handler isn't cached (rarely needed) + + try { + declFirst = null; + declFirst = (DeclHandler) first.getProperty ( + EventFilter.DECL_HANDLER); + } catch (SAXException e) {} + try { + declRest = null; + declRest = (DeclHandler) rest.getProperty ( + EventFilter.DECL_HANDLER); + } catch (SAXException e) {} + + try { + lexFirst = null; + lexFirst = (LexicalHandler) first.getProperty ( + EventFilter.LEXICAL_HANDLER); + } catch (SAXException e) {} + try { + lexRest = null; + lexRest = (LexicalHandler) rest.getProperty ( + EventFilter.LEXICAL_HANDLER); + } catch (SAXException e) {} } /* FIXME @@ -132,78 +132,78 @@ final public class TeeConsumer * two-consumer constructor for this class. * * @param first Description of the first pipeline to get events, - * which will be passed to {@link PipelineFactory#createPipeline} + * which will be passed to {@link PipelineFactory#createPipeline} * @param rest The second pipeline to get the events * / - // constructor used by PipelineFactory + // constructor used by PipelineFactory public TeeConsumer (String first, EventConsumer rest) throws IOException { - this (PipelineFactory.createPipeline (first), rest); + this (PipelineFactory.createPipeline (first), rest); } */ /** Returns the first pipeline to get event calls. */ public EventConsumer getFirst () - { return first; } + { return first; } /** Returns the second pipeline to get event calls. */ public EventConsumer getRest () - { return rest; } + { return rest; } /** Returns the content handler being used. */ final public ContentHandler getContentHandler () { - if (docRest == null) - return docFirst; - if (docFirst == null) - return docRest; - return this; + if (docRest == null) + return docFirst; + if (docFirst == null) + return docRest; + return this; } /** Returns the dtd handler being used. */ final public DTDHandler getDTDHandler () { - // not cached (hardly used) - if (rest.getDTDHandler () == null) - return first.getDTDHandler (); - if (first.getDTDHandler () == null) - return rest.getDTDHandler (); - return this; + // not cached (hardly used) + if (rest.getDTDHandler () == null) + return first.getDTDHandler (); + if (first.getDTDHandler () == null) + return rest.getDTDHandler (); + return this; } /** Returns the declaration or lexical handler being used. */ final public Object getProperty (String id) throws SAXNotRecognizedException { - // - // in degenerate cases, we have no work to do. - // - Object firstProp = null, restProp = null; - - try { firstProp = first.getProperty (id); } - catch (SAXNotRecognizedException e) { /* ignore */ } - try { restProp = rest.getProperty (id); } - catch (SAXNotRecognizedException e) { /* ignore */ } - - if (restProp == null) - return firstProp; - if (firstProp == null) - return restProp; - - // - // we've got work to do; handle two builtin cases. - // - if (EventFilter.DECL_HANDLER.equals (id)) - return this; - if (EventFilter.LEXICAL_HANDLER.equals (id)) - return this; - - // - // non-degenerate, handled by both consumers, but we don't know - // how to handle this. - // - throw new SAXNotRecognizedException ("can't tee: " + id); + // + // in degenerate cases, we have no work to do. + // + Object firstProp = null, restProp = null; + + try { firstProp = first.getProperty (id); } + catch (SAXNotRecognizedException e) { /* ignore */ } + try { restProp = rest.getProperty (id); } + catch (SAXNotRecognizedException e) { /* ignore */ } + + if (restProp == null) + return firstProp; + if (firstProp == null) + return restProp; + + // + // we've got work to do; handle two builtin cases. + // + if (EventFilter.DECL_HANDLER.equals (id)) + return this; + if (EventFilter.LEXICAL_HANDLER.equals (id)) + return this; + + // + // non-degenerate, handled by both consumers, but we don't know + // how to handle this. + // + throw new SAXNotRecognizedException ("can't tee: " + id); } /** @@ -212,8 +212,8 @@ final public class TeeConsumer */ public void setErrorHandler (ErrorHandler handler) { - first.setErrorHandler (handler); - rest.setErrorHandler (handler); + first.setErrorHandler (handler); + rest.setErrorHandler (handler); } @@ -222,83 +222,83 @@ final public class TeeConsumer // public void setDocumentLocator (Locator locator) { - // this call is not made by all parsers - docFirst.setDocumentLocator (locator); - docRest.setDocumentLocator (locator); + // this call is not made by all parsers + docFirst.setDocumentLocator (locator); + docRest.setDocumentLocator (locator); } public void startDocument () throws SAXException { - docFirst.startDocument (); - docRest.startDocument (); + docFirst.startDocument (); + docRest.startDocument (); } public void endDocument () throws SAXException { - try { - docFirst.endDocument (); - } finally { - docRest.endDocument (); - } + try { + docFirst.endDocument (); + } finally { + docRest.endDocument (); + } } public void startPrefixMapping (String prefix, String uri) throws SAXException { - docFirst.startPrefixMapping (prefix, uri); - docRest.startPrefixMapping (prefix, uri); + docFirst.startPrefixMapping (prefix, uri); + docRest.startPrefixMapping (prefix, uri); } public void endPrefixMapping (String prefix) throws SAXException { - docFirst.endPrefixMapping (prefix); - docRest.endPrefixMapping (prefix); + docFirst.endPrefixMapping (prefix); + docRest.endPrefixMapping (prefix); } public void skippedEntity (String name) throws SAXException { - docFirst.skippedEntity (name); - docRest.skippedEntity (name); + docFirst.skippedEntity (name); + docRest.skippedEntity (name); } public void startElement (String uri, String localName, - String qName, Attributes atts) + String qName, Attributes atts) throws SAXException { - docFirst.startElement (uri, localName, qName, atts); - docRest.startElement (uri, localName, qName, atts); + docFirst.startElement (uri, localName, qName, atts); + docRest.startElement (uri, localName, qName, atts); } public void endElement (String uri, String localName, String qName) throws SAXException { - docFirst.endElement (uri, localName, qName); - docRest.endElement (uri, localName, qName); + docFirst.endElement (uri, localName, qName); + docRest.endElement (uri, localName, qName); } public void processingInstruction (String target, String data) throws SAXException { - docFirst.processingInstruction (target, data); - docRest.processingInstruction (target, data); + docFirst.processingInstruction (target, data); + docRest.processingInstruction (target, data); } public void characters (char ch [], int start, int length) throws SAXException { - docFirst.characters (ch, start, length); - docRest.characters (ch, start, length); + docFirst.characters (ch, start, length); + docRest.characters (ch, start, length); } public void ignorableWhitespace (char ch [], int start, int length) throws SAXException { - docFirst.ignorableWhitespace (ch, start, length); - docRest.ignorableWhitespace (ch, start, length); + docFirst.ignorableWhitespace (ch, start, length); + docRest.ignorableWhitespace (ch, start, length); } @@ -308,23 +308,23 @@ final public class TeeConsumer public void notationDecl (String name, String publicId, String systemId) throws SAXException { - DTDHandler l1 = first.getDTDHandler (); - DTDHandler l2 = rest.getDTDHandler (); + DTDHandler l1 = first.getDTDHandler (); + DTDHandler l2 = rest.getDTDHandler (); - l1.notationDecl (name, publicId, systemId); - l2.notationDecl (name, publicId, systemId); + l1.notationDecl (name, publicId, systemId); + l2.notationDecl (name, publicId, systemId); } public void unparsedEntityDecl (String name, - String publicId, String systemId, - String notationName + String publicId, String systemId, + String notationName ) throws SAXException { - DTDHandler l1 = first.getDTDHandler (); - DTDHandler l2 = rest.getDTDHandler (); + DTDHandler l1 = first.getDTDHandler (); + DTDHandler l2 = rest.getDTDHandler (); - l1.unparsedEntityDecl (name, publicId, systemId, notationName); - l2.unparsedEntityDecl (name, publicId, systemId, notationName); + l1.unparsedEntityDecl (name, publicId, systemId, notationName); + l2.unparsedEntityDecl (name, publicId, systemId, notationName); } @@ -332,34 +332,34 @@ final public class TeeConsumer // DeclHandler // public void attributeDecl (String eName, String aName, - String type, - String mode, String value) + String type, + String mode, String value) throws SAXException { - declFirst.attributeDecl (eName, aName, type, mode, value); - declRest.attributeDecl (eName, aName, type, mode, value); + declFirst.attributeDecl (eName, aName, type, mode, value); + declRest.attributeDecl (eName, aName, type, mode, value); } public void elementDecl (String name, String model) throws SAXException { - declFirst.elementDecl (name, model); - declRest.elementDecl (name, model); + declFirst.elementDecl (name, model); + declRest.elementDecl (name, model); } public void externalEntityDecl (String name, - String publicId, String systemId) + String publicId, String systemId) throws SAXException { - declFirst.externalEntityDecl (name, publicId, systemId); - declRest.externalEntityDecl (name, publicId, systemId); + declFirst.externalEntityDecl (name, publicId, systemId); + declRest.externalEntityDecl (name, publicId, systemId); } public void internalEntityDecl (String name, String value) throws SAXException { - declFirst.internalEntityDecl (name, value); - declRest.internalEntityDecl (name, value); + declFirst.internalEntityDecl (name, value); + declRest.internalEntityDecl (name, value); } @@ -369,49 +369,49 @@ final public class TeeConsumer public void comment (char ch [], int start, int length) throws SAXException { - lexFirst.comment (ch, start, length); - lexRest.comment (ch, start, length); + lexFirst.comment (ch, start, length); + lexRest.comment (ch, start, length); } - + public void startCDATA () throws SAXException { - lexFirst.startCDATA (); - lexRest.startCDATA (); + lexFirst.startCDATA (); + lexRest.startCDATA (); } - + public void endCDATA () throws SAXException { - lexFirst.endCDATA (); - lexRest.endCDATA (); + lexFirst.endCDATA (); + lexRest.endCDATA (); } - + public void startEntity (String name) throws SAXException { - lexFirst.startEntity (name); - lexRest.startEntity (name); + lexFirst.startEntity (name); + lexRest.startEntity (name); } - + public void endEntity (String name) throws SAXException { - lexFirst.endEntity (name); - lexRest.endEntity (name); + lexFirst.endEntity (name); + lexRest.endEntity (name); } - + public void startDTD (String name, String publicId, String systemId) throws SAXException { - lexFirst.startDTD (name, publicId, systemId); - lexRest.startDTD (name, publicId, systemId); + lexFirst.startDTD (name, publicId, systemId); + lexRest.startDTD (name, publicId, systemId); } - + public void endDTD () throws SAXException { - lexFirst.endDTD (); - lexRest.endDTD (); + lexFirst.endDTD (); + lexRest.endDTD (); } } diff --git a/libjava/classpath/gnu/xml/pipeline/TextConsumer.java b/libjava/classpath/gnu/xml/pipeline/TextConsumer.java index 67bd23b..13dcfa7 100644 --- a/libjava/classpath/gnu/xml/pipeline/TextConsumer.java +++ b/libjava/classpath/gnu/xml/pipeline/TextConsumer.java @@ -1,4 +1,4 @@ -/* TextConsumer.java -- +/* TextConsumer.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -72,8 +72,8 @@ public class TextConsumer extends XMLWriter implements EventConsumer public TextConsumer (Writer w, boolean isXhtml) throws IOException { - super (w, isXhtml ? "US-ASCII" : null); - setXhtml (isXhtml); + super (w, isXhtml ? "US-ASCII" : null); + setXhtml (isXhtml); } /** @@ -83,9 +83,9 @@ public class TextConsumer extends XMLWriter implements EventConsumer public TextConsumer (Writer w) throws IOException { - this (w, false); + this (w, false); } - + /** * Constructs a consumer that writes its input as XML text, * encoded in UTF-8. XHTML rules are not followed. @@ -93,25 +93,25 @@ public class TextConsumer extends XMLWriter implements EventConsumer public TextConsumer (OutputStream out) throws IOException { - this (new OutputStreamWriter (out, "UTF8"), false); + this (new OutputStreamWriter (out, "UTF8"), false); } /** <b>EventConsumer</b> Returns the document handler being used. */ public ContentHandler getContentHandler () - { return this; } + { return this; } /** <b>EventConsumer</b> Returns the dtd handler being used. */ public DTDHandler getDTDHandler () - { return this; } + { return this; } /** <b>XMLReader</b>Retrieves a property (lexical and decl handlers) */ public Object getProperty (String propertyId) throws SAXNotRecognizedException { - if (EventFilter.LEXICAL_HANDLER.equals (propertyId)) - return this; - if (EventFilter.DECL_HANDLER.equals (propertyId)) - return this; - throw new SAXNotRecognizedException (propertyId); + if (EventFilter.LEXICAL_HANDLER.equals (propertyId)) + return this; + if (EventFilter.DECL_HANDLER.equals (propertyId)) + return this; + throw new SAXNotRecognizedException (propertyId); } } diff --git a/libjava/classpath/gnu/xml/pipeline/ValidationConsumer.java b/libjava/classpath/gnu/xml/pipeline/ValidationConsumer.java index 8391767..0346984 100644 --- a/libjava/classpath/gnu/xml/pipeline/ValidationConsumer.java +++ b/libjava/classpath/gnu/xml/pipeline/ValidationConsumer.java @@ -1,4 +1,4 @@ -/* ValidationConsumer.java -- +/* ValidationConsumer.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -62,24 +62,24 @@ import org.xml.sax.helpers.XMLReaderFactory; * both a filter and a terminus on an event pipeline. It relies on the * producer of SAX events to: </p> <ol> * - * <li> Conform to the specification of a non-validating XML parser that - * reads all external entities, reported using SAX2 events. </li> + * <li> Conform to the specification of a non-validating XML parser that + * reads all external entities, reported using SAX2 events. </li> * - * <li> Report ignorable whitespace as such (through the ContentHandler - * interface). This is, strictly speaking, optional for nonvalidating - * XML processors. </li> + * <li> Report ignorable whitespace as such (through the ContentHandler + * interface). This is, strictly speaking, optional for nonvalidating + * XML processors. </li> * - * <li> Make SAX2 DeclHandler callbacks, with default - * attribute values already normalized (and without "<").</li> + * <li> Make SAX2 DeclHandler callbacks, with default + * attribute values already normalized (and without "<").</li> * - * <li> Make SAX2 LexicalHandler startDTD() and endDTD () - * callbacks. </li> + * <li> Make SAX2 LexicalHandler startDTD() and endDTD () + * callbacks. </li> * - * <li> Act as if the <em>(URI)/namespace-prefixes</em> property were - * set to true, by providing XML 1.0 names and all <code>xmlns*</code> - * attributes (rather than omitting either or both). </li> + * <li> Act as if the <em>(URI)/namespace-prefixes</em> property were + * set to true, by providing XML 1.0 names and all <code>xmlns*</code> + * attributes (rather than omitting either or both). </li> * - * </ol> + * </ol> * * <p> At this writing, the major SAX2 parsers (such as Ælfred2, * Crimson, and Xerces) meet these requirements, and this validation @@ -128,51 +128,51 @@ import org.xml.sax.helpers.XMLReaderFactory; * of them) or discarded (popular for the standalone declaration); in short, * that these are bugs in the XML specification (not all via SGML): </p><ul> * - * <li> The <em>Proper Declaration/PE Nesting</em> and - * <em>Proper Group/PE Nesting</em> VCs can't be tested because they - * require access to particularly low level lexical level information. - * In essence, the reason XML isn't a simple thing to parse is that - * it's not a context free grammar, and these constraints elevate that - * SGML-derived context sensitivity to the level of a semantic rule. + * <li> The <em>Proper Declaration/PE Nesting</em> and + * <em>Proper Group/PE Nesting</em> VCs can't be tested because they + * require access to particularly low level lexical level information. + * In essence, the reason XML isn't a simple thing to parse is that + * it's not a context free grammar, and these constraints elevate that + * SGML-derived context sensitivity to the level of a semantic rule. * - * <li> The <em>Standalone Document Declaration</em> VC can't be - * tested. This is for two reasons. First, this flag isn't made - * available through SAX2. Second, it also requires breaking that - * lexical layering boundary. (If you ever wondered why classes - * in compiler construction or language design barely mention the - * existence of context-sensitive grammars, it's because of messy - * issues like these.) + * <li> The <em>Standalone Document Declaration</em> VC can't be + * tested. This is for two reasons. First, this flag isn't made + * available through SAX2. Second, it also requires breaking that + * lexical layering boundary. (If you ever wondered why classes + * in compiler construction or language design barely mention the + * existence of context-sensitive grammars, it's because of messy + * issues like these.) * - * <li> The <em>Entity Declared</em> VC can't be tested, because it - * also requires breaking that lexical layering boundary! There's also - * another issue: the VC wording (and seemingly intent) is ambiguous. - * (This is still true in the "Second edition" XML spec.) - * Since there is a WFC of the same name, everyone's life would be - * easier if references to undeclared parsed entities were always well - * formedness errors, regardless of whether they're parameter entities - * or not. (Note that nonvalidating parsers are not required - * to report all such well formedness errors if they don't read external - * parameter entities, although currently most XML parsers read them - * in an attempt to avoid problems from inconsistent parser behavior.) + * <li> The <em>Entity Declared</em> VC can't be tested, because it + * also requires breaking that lexical layering boundary! There's also + * another issue: the VC wording (and seemingly intent) is ambiguous. + * (This is still true in the "Second edition" XML spec.) + * Since there is a WFC of the same name, everyone's life would be + * easier if references to undeclared parsed entities were always well + * formedness errors, regardless of whether they're parameter entities + * or not. (Note that nonvalidating parsers are not required + * to report all such well formedness errors if they don't read external + * parameter entities, although currently most XML parsers read them + * in an attempt to avoid problems from inconsistent parser behavior.) * - * </ul> + * </ul> * * <p> The second category of limitations on this validation represent * constraints associated with information that is not guaranteed to be * available (or in one case, <em>is guaranteed not to be available</em>, * through the SAX2 API: </p><ul> * - * <li> The <em>Unique Element Type Declaration</em> VC may not be - * reportable, if the underlying parser happens not to expose - * multiple declarations. (Ælfred2 reports these validity - * errors directly.)</li> + * <li> The <em>Unique Element Type Declaration</em> VC may not be + * reportable, if the underlying parser happens not to expose + * multiple declarations. (Ælfred2 reports these validity + * errors directly.)</li> * - * <li> Similarly, the <em>Unique Notation Name</em> VC, added in the - * 14-January-2000 XML spec errata to restrict typing models used by - * elements, may not be reportable. (Ælfred reports these - * validity errors directly.) </li> + * <li> Similarly, the <em>Unique Notation Name</em> VC, added in the + * 14-January-2000 XML spec errata to restrict typing models used by + * elements, may not be reportable. (Ælfred reports these + * validity errors directly.) </li> * - * </ul> + * </ul> * * <p> A third category relates to ease of implementation. (Think of this * as "bugs".) The most notable issue here is character handling. Rather @@ -199,15 +199,15 @@ public final class ValidationConsumer extends EventFilter { // report error if we happen to notice a non-deterministic choice? // we won't report buggy content models; just buggy instances - private static final boolean warnNonDeterministic = false; + private static final boolean warnNonDeterministic = false; // for tracking active content models - private String rootName; - private Stack contentStack = new Stack (); + private String rootName; + private Stack contentStack = new Stack (); // flags for "saved DTD" processing - private boolean disableDeclarations; - private boolean disableReset; + private boolean disableDeclarations; + private boolean disableReset; // // most VCs get tested when we see element start tags. the per-element @@ -217,25 +217,25 @@ public final class ValidationConsumer extends EventFilter // // key = element name; value = ElementInfo - private Hashtable elements = new Hashtable (); + private Hashtable elements = new Hashtable (); // some VCs relate to ID/IDREF/IDREFS attributes // key = id; value = boolean true (defd) or false (refd) - private Hashtable ids = new Hashtable (); + private Hashtable ids = new Hashtable (); // we just record declared notation and unparsed entity names. // the implementation here is simple/slow; these features // are seldom used, one hopes they'll wither away soon - private Vector notations = new Vector (5, 5); - private Vector nDeferred = new Vector (5, 5); - private Vector unparsed = new Vector (5, 5); - private Vector uDeferred = new Vector (5, 5); - - // note: DocBk 3.1.7 XML defines over 2 dozen notations, - // used when defining unparsed entities for graphics - // (and maybe in other places) + private Vector notations = new Vector (5, 5); + private Vector nDeferred = new Vector (5, 5); + private Vector unparsed = new Vector (5, 5); + private Vector uDeferred = new Vector (5, 5); + + // note: DocBk 3.1.7 XML defines over 2 dozen notations, + // used when defining unparsed entities for graphics + // (and maybe in other places) + - /** * Creates a pipeline terminus which consumes all events passed to @@ -244,11 +244,11 @@ public final class ValidationConsumer extends EventFilter * * @see #setErrorHandler */ - // constructor used by PipelineFactory - // ... and want one taking system ID of an external subset + // constructor used by PipelineFactory + // ... and want one taking system ID of an external subset public ValidationConsumer () { - this (null); + this (null); } /** @@ -257,25 +257,25 @@ public final class ValidationConsumer extends EventFilter * * @see #setErrorHandler */ - // constructor used by PipelineFactory - // ... and want one taking system ID of an external subset - // (which won't send declaration events) + // constructor used by PipelineFactory + // ... and want one taking system ID of an external subset + // (which won't send declaration events) public ValidationConsumer (EventConsumer next) { - super (next); - - setContentHandler (this); - setDTDHandler (this); - try { setProperty (DECL_HANDLER, this); } - catch (Exception e) { /* "can't happen" */ } - try { setProperty (LEXICAL_HANDLER, this); } - catch (Exception e) { /* "can't happen" */ } + super (next); + + setContentHandler (this); + setDTDHandler (this); + try { setProperty (DECL_HANDLER, this); } + catch (Exception e) { /* "can't happen" */ } + try { setProperty (LEXICAL_HANDLER, this); } + catch (Exception e) { /* "can't happen" */ } } - - private static final String fakeRootName - = ":Nobody:in:their_Right.Mind_would:use:this-name:1x:"; - + + private static final String fakeRootName + = ":Nobody:in:their_Right.Mind_would:use:this-name:1x:"; + /** * Creates a validation consumer which is preloaded with the DTD provided. * It does this by constructing a document with that DTD, then parsing @@ -287,182 +287,182 @@ public final class ValidationConsumer extends EventFilter * in a document being parsed. * * @param rootName The name of the required root element; if this is - * null, any root element name will be accepted. + * null, any root element name will be accepted. * @param publicId If non-null and there is a non-null systemId, this - * identifier provides an alternate access identifier for the DTD's - * external subset. + * identifier provides an alternate access identifier for the DTD's + * external subset. * @param systemId If non-null, this is a URI (normally URL) that - * may be used to access the DTD's external subset. + * may be used to access the DTD's external subset. * @param internalSubset If non-null, holds literal markup declarations - * comprising the DTD's internal subset. + * comprising the DTD's internal subset. * @param resolver If non-null, this will be provided to the parser for - * use when resolving parameter entities (including any external subset). + * use when resolving parameter entities (including any external subset). * @param resolver If non-null, this will be provided to the parser for - * use when resolving parameter entities (including any external subset). + * use when resolving parameter entities (including any external subset). * @param minimalElement If non-null, a minimal valid document. * * @exception SAXNotSupportedException If the default SAX parser does - * not support the standard lexical or declaration handlers. + * not support the standard lexical or declaration handlers. * @exception SAXParseException If the specified DTD has either - * well-formedness or validity errors + * well-formedness or validity errors * @exception IOException If the specified DTD can't be read for - * some reason + * some reason */ public ValidationConsumer ( - String rootName, - String publicId, - String systemId, - String internalSubset, - EntityResolver resolver, - String minimalDocument + String rootName, + String publicId, + String systemId, + String internalSubset, + EntityResolver resolver, + String minimalDocument ) throws SAXException, IOException { - this (null); - - disableReset = true; - if (rootName == null) - rootName = fakeRootName; - - // - // Synthesize document with that DTD; is it possible to do - // better for the declaration of the root element? - // - // NOTE: can't use SAX2 to write internal subsets. - // - StringWriter writer = new StringWriter (); - - writer.write ("<!DOCTYPE "); - writer.write (rootName); - if (systemId != null) { - writer.write ("\n "); - if (publicId != null) { - writer.write ("PUBLIC '"); - writer.write (publicId); - writer.write ("'\n\t'"); - } else - writer.write ("SYSTEM '"); - writer.write (systemId); - writer.write ("'"); - } - writer.write (" [ "); - if (rootName == fakeRootName) { - writer.write ("\n<!ELEMENT "); - writer.write (rootName); - writer.write (" EMPTY>"); - } - if (internalSubset != null) - writer.write (internalSubset); - writer.write ("\n ]>"); - - if (minimalDocument != null) { - writer.write ("\n"); - writer.write (minimalDocument); - writer.write ("\n"); - } else { - writer.write (" <"); - writer.write (rootName); - writer.write ("/>\n"); - } - minimalDocument = writer.toString (); - - // - // OK, load it - // - XMLReader producer; - - producer = XMLReaderFactory.createXMLReader (); - bind (producer, this); - - if (resolver != null) - producer.setEntityResolver (resolver); - - InputSource in; - - in = new InputSource (new StringReader (minimalDocument)); - producer.parse (in); - - disableDeclarations = true; - if (rootName == fakeRootName) - this.rootName = null; + this (null); + + disableReset = true; + if (rootName == null) + rootName = fakeRootName; + + // + // Synthesize document with that DTD; is it possible to do + // better for the declaration of the root element? + // + // NOTE: can't use SAX2 to write internal subsets. + // + StringWriter writer = new StringWriter (); + + writer.write ("<!DOCTYPE "); + writer.write (rootName); + if (systemId != null) { + writer.write ("\n "); + if (publicId != null) { + writer.write ("PUBLIC '"); + writer.write (publicId); + writer.write ("'\n\t'"); + } else + writer.write ("SYSTEM '"); + writer.write (systemId); + writer.write ("'"); + } + writer.write (" [ "); + if (rootName == fakeRootName) { + writer.write ("\n<!ELEMENT "); + writer.write (rootName); + writer.write (" EMPTY>"); + } + if (internalSubset != null) + writer.write (internalSubset); + writer.write ("\n ]>"); + + if (minimalDocument != null) { + writer.write ("\n"); + writer.write (minimalDocument); + writer.write ("\n"); + } else { + writer.write (" <"); + writer.write (rootName); + writer.write ("/>\n"); + } + minimalDocument = writer.toString (); + + // + // OK, load it + // + XMLReader producer; + + producer = XMLReaderFactory.createXMLReader (); + bind (producer, this); + + if (resolver != null) + producer.setEntityResolver (resolver); + + InputSource in; + + in = new InputSource (new StringReader (minimalDocument)); + producer.parse (in); + + disableDeclarations = true; + if (rootName == fakeRootName) + this.rootName = null; } private void resetState () { - if (!disableReset) { - rootName = null; - contentStack.removeAllElements (); - elements.clear (); - ids.clear (); - - notations.removeAllElements (); - nDeferred.removeAllElements (); - unparsed.removeAllElements (); - uDeferred.removeAllElements (); - } + if (!disableReset) { + rootName = null; + contentStack.removeAllElements (); + elements.clear (); + ids.clear (); + + notations.removeAllElements (); + nDeferred.removeAllElements (); + unparsed.removeAllElements (); + uDeferred.removeAllElements (); + } } private void warning (String description) throws SAXException { - ErrorHandler errHandler = getErrorHandler (); - Locator locator = getDocumentLocator (); - SAXParseException err; - - if (errHandler == null) - return; - - if (locator == null) - err = new SAXParseException (description, null, null, -1, -1); - else - err = new SAXParseException (description, locator); - errHandler.warning (err); + ErrorHandler errHandler = getErrorHandler (); + Locator locator = getDocumentLocator (); + SAXParseException err; + + if (errHandler == null) + return; + + if (locator == null) + err = new SAXParseException (description, null, null, -1, -1); + else + err = new SAXParseException (description, locator); + errHandler.warning (err); } // package private (for ChildrenRecognizer) private void error (String description) throws SAXException { - ErrorHandler errHandler = getErrorHandler (); - Locator locator = getDocumentLocator (); - SAXParseException err; - - if (locator == null) - err = new SAXParseException (description, null, null, -1, -1); - else - err = new SAXParseException (description, locator); - if (errHandler != null) - errHandler.error (err); - else // else we always treat it as fatal! - throw err; + ErrorHandler errHandler = getErrorHandler (); + Locator locator = getDocumentLocator (); + SAXParseException err; + + if (locator == null) + err = new SAXParseException (description, null, null, -1, -1); + else + err = new SAXParseException (description, locator); + if (errHandler != null) + errHandler.error (err); + else // else we always treat it as fatal! + throw err; } private void fatalError (String description) throws SAXException { - ErrorHandler errHandler = getErrorHandler (); - Locator locator = getDocumentLocator (); - SAXParseException err; - - if (locator != null) - err = new SAXParseException (description, locator); - else - err = new SAXParseException (description, null, null, -1, -1); - if (errHandler != null) - errHandler.fatalError (err); - // we always treat this as fatal, regardless of the handler - throw err; + ErrorHandler errHandler = getErrorHandler (); + Locator locator = getDocumentLocator (); + SAXParseException err; + + if (locator != null) + err = new SAXParseException (description, locator); + else + err = new SAXParseException (description, null, null, -1, -1); + if (errHandler != null) + errHandler.fatalError (err); + // we always treat this as fatal, regardless of the handler + throw err; } private static boolean isExtender (char c) { - // [88] Extender ::= ... - return c == 0x00b7 || c == 0x02d0 || c == 0x02d1 || c == 0x0387 - || c == 0x0640 || c == 0x0e46 || c == 0x0ec6 || c == 0x3005 - || (c >= 0x3031 && c <= 0x3035) - || (c >= 0x309d && c <= 0x309e) - || (c >= 0x30fc && c <= 0x30fe); + // [88] Extender ::= ... + return c == 0x00b7 || c == 0x02d0 || c == 0x02d1 || c == 0x0387 + || c == 0x0640 || c == 0x0e46 || c == 0x0ec6 || c == 0x3005 + || (c >= 0x3031 && c <= 0x3035) + || (c >= 0x309d && c <= 0x309e) + || (c >= 0x30fc && c <= 0x30fe); } @@ -470,86 +470,86 @@ public final class ValidationConsumer extends EventFilter private boolean isName (String name, String context, String id) throws SAXException { - char buf [] = name.toCharArray (); - boolean pass = true; - - if (!Character.isUnicodeIdentifierStart (buf [0]) - && ":_".indexOf (buf [0]) == -1) - pass = false; - else { - int max = buf.length; - for (int i = 1; pass && i < max; i++) { - char c = buf [i]; - if (!Character.isUnicodeIdentifierPart (c) - && ":-_.".indexOf (c) == -1 - && !isExtender (c)) - pass = false; - } - } - - if (!pass) - error ("In " + context + " for " + id - + ", '" + name + "' is not a name"); - return pass; // true == OK + char buf [] = name.toCharArray (); + boolean pass = true; + + if (!Character.isUnicodeIdentifierStart (buf [0]) + && ":_".indexOf (buf [0]) == -1) + pass = false; + else { + int max = buf.length; + for (int i = 1; pass && i < max; i++) { + char c = buf [i]; + if (!Character.isUnicodeIdentifierPart (c) + && ":-_.".indexOf (c) == -1 + && !isExtender (c)) + pass = false; + } + } + + if (!pass) + error ("In " + context + " for " + id + + ", '" + name + "' is not a name"); + return pass; // true == OK } // use augmented Unicode rules, not full XML rules private boolean isNmtoken (String nmtoken, String context, String id) throws SAXException { - char buf [] = nmtoken.toCharArray (); - boolean pass = true; - int max = buf.length; - - // XXX make this share code with isName - - for (int i = 0; pass && i < max; i++) { - char c = buf [i]; - if (!Character.isUnicodeIdentifierPart (c) - && ":-_.".indexOf (c) == -1 - && !isExtender (c)) - pass = false; - } - - if (!pass) - error ("In " + context + " for " + id - + ", '" + nmtoken + "' is not a name token"); - return pass; // true == OK + char buf [] = nmtoken.toCharArray (); + boolean pass = true; + int max = buf.length; + + // XXX make this share code with isName + + for (int i = 0; pass && i < max; i++) { + char c = buf [i]; + if (!Character.isUnicodeIdentifierPart (c) + && ":-_.".indexOf (c) == -1 + && !isExtender (c)) + pass = false; + } + + if (!pass) + error ("In " + context + " for " + id + + ", '" + nmtoken + "' is not a name token"); + return pass; // true == OK } private void checkEnumeration (String value, String type, String name) throws SAXException { - if (!hasMatch (value, type)) - // VC: Enumeration - error ("Value '" + value - + "' for attribute '" + name - + "' is not permitted: " + type); + if (!hasMatch (value, type)) + // VC: Enumeration + error ("Value '" + value + + "' for attribute '" + name + + "' is not permitted: " + type); } // used to test enumerated attributes and mixed content models // package private static boolean hasMatch (String value, String orList) { - int len = value.length (); - int max = orList.length () - len; - - for (int start = 0; - (start = orList.indexOf (value, start)) != -1; - start++) { - char c; - - if (start > max) - break; - c = orList.charAt (start - 1); - if (c != '|' && c != '('/*)*/) - continue; - c = orList.charAt (start + len); - if (c != '|' && /*(*/ c != ')') - continue; - return true; - } - return false; + int len = value.length (); + int max = orList.length () - len; + + for (int start = 0; + (start = orList.indexOf (value, start)) != -1; + start++) { + char c; + + if (start > max) + break; + c = orList.charAt (start - 1); + if (c != '|' && c != '('/*)*/) + continue; + c = orList.charAt (start + len); + if (c != '|' && /*(*/ c != ')') + continue; + return true; + } + return false; } /** @@ -561,11 +561,11 @@ public final class ValidationConsumer extends EventFilter public void startDTD (String name, String publicId, String systemId) throws SAXException { - if (disableDeclarations) - return; + if (disableDeclarations) + return; - rootName = name; - super.startDTD (name, publicId, systemId); + rootName = name; + super.startDTD (name, publicId, systemId); } /** @@ -577,37 +577,37 @@ public final class ValidationConsumer extends EventFilter public void endDTD () throws SAXException { - if (disableDeclarations) - return; - - // this is a convenient hook for end-of-dtd checks, but we - // could also trigger it in the first startElement call. - // locator info is more appropriate here though. - - // VC: Notation Declared (NDATA can refer to them before decls, - // as can NOTATION attribute enumerations and defaults) - int length = nDeferred.size (); - for (int i = 0; i < length; i++) { - String notation = (String) nDeferred.elementAt (i); - if (!notations.contains (notation)) { - error ("A declaration referred to notation '" + notation - + "' which was never declared"); - } - } - nDeferred.removeAllElements (); - - // VC: Entity Name (attribute values can refer to them - // before they're declared); VC Attribute Default Legal - length = uDeferred.size (); - for (int i = 0; i < length; i++) { - String entity = (String) uDeferred.elementAt (i); - if (!unparsed.contains (entity)) { - error ("An attribute default referred to entity '" + entity - + "' which was never declared"); - } - } - uDeferred.removeAllElements (); - super.endDTD (); + if (disableDeclarations) + return; + + // this is a convenient hook for end-of-dtd checks, but we + // could also trigger it in the first startElement call. + // locator info is more appropriate here though. + + // VC: Notation Declared (NDATA can refer to them before decls, + // as can NOTATION attribute enumerations and defaults) + int length = nDeferred.size (); + for (int i = 0; i < length; i++) { + String notation = (String) nDeferred.elementAt (i); + if (!notations.contains (notation)) { + error ("A declaration referred to notation '" + notation + + "' which was never declared"); + } + } + nDeferred.removeAllElements (); + + // VC: Entity Name (attribute values can refer to them + // before they're declared); VC Attribute Default Legal + length = uDeferred.size (); + for (int i = 0; i < length; i++) { + String entity = (String) uDeferred.elementAt (i); + if (!unparsed.contains (entity)) { + error ("An attribute default referred to entity '" + entity + + "' which was never declared"); + } + } + uDeferred.removeAllElements (); + super.endDTD (); } @@ -615,10 +615,10 @@ public final class ValidationConsumer extends EventFilter // all attributes except enumerations ... // "(this|or|that|...)" and "NOTATION (this|or|that|...)" static final String types [] = { - "CDATA", - "ID", "IDREF", "IDREFS", - "NMTOKEN", "NMTOKENS", - "ENTITY", "ENTITIES" + "CDATA", + "ID", "IDREF", "IDREFS", + "NMTOKEN", "NMTOKENS", + "ENTITY", "ENTITIES" }; @@ -630,172 +630,172 @@ public final class ValidationConsumer extends EventFilter * preloaded with a particular DTD. */ public void attributeDecl ( - String eName, - String aName, - String type, - String mode, - String value + String eName, + String aName, + String type, + String mode, + String value ) throws SAXException { - if (disableDeclarations) - return; - - ElementInfo info = (ElementInfo) elements.get (eName); - AttributeInfo ainfo = new AttributeInfo (); - boolean checkOne = false; - boolean interned = false; - - // cheap interning of type names and #FIXED, #REQUIRED - // for faster startElement (we can use "==") - for (int i = 0; i < types.length; i++) { - if (types [i].equals (type)) { - type = types [i]; - interned = true; - break; - } - } - if ("#FIXED".equals (mode)) - mode = "#FIXED"; - else if ("#REQUIRED".equals (mode)) - mode = "#REQUIRED"; - - ainfo.type = type; - ainfo.mode = mode; - ainfo.value = value; - - // we might not have seen the content model yet - if (info == null) { - info = new ElementInfo (eName); - elements.put (eName, info); - } - if ("ID" == type) { - checkOne = true; - if (!("#REQUIRED" == mode || "#IMPLIED".equals (mode))) { - // VC: ID Attribute Default - error ("ID attribute '" + aName - + "' must be #IMPLIED or #REQUIRED"); - } - - } else if (!interned && type.startsWith ("NOTATION ")) { - checkOne = true; - - // VC: Notation Attributes (notations must be declared) - StringTokenizer tokens = new StringTokenizer ( - type.substring (10, type.lastIndexOf (')')), - "|"); - while (tokens.hasMoreTokens ()) { - String token = tokens.nextToken (); - if (!notations.contains (token)) - nDeferred.addElement (token); - } - } - if (checkOne) { - for (Enumeration e = info.attributes.keys (); - e.hasMoreElements (); - /* NOP */) { - String name; - AttributeInfo ainfo2; - - name = (String) e.nextElement (); - ainfo2 = (AttributeInfo) info.attributes.get (name); - if (type == ainfo2.type || !interned /* NOTATION */) { - // VC: One ID per Element Type - // VC: One Notation per Element TYpe - error ("Element '" + eName - + "' already has an attribute of type " - + (interned ? "NOTATION" : type) - + " ('" + name - + "') so '" + aName - + "' is a validity error"); - } - } - } - - // VC: Attribute Default Legal - if (value != null) { - - if ("CDATA" == type) { - // event source rejected '<' - - } else if ("NMTOKEN" == type) { - // VC: Name Token (is a nmtoken) - isNmtoken (value, "attribute default", aName); - - } else if ("NMTOKENS" == type) { - // VC: Name Token (is a nmtoken; at least one value) - StringTokenizer tokens = new StringTokenizer (value); - if (!tokens.hasMoreTokens ()) - error ("Default for attribute '" + aName - + "' must have at least one name token."); - else do { - String token = tokens.nextToken (); - isNmtoken (token, "attribute default", aName); - } while (tokens.hasMoreTokens ()); - - } else if ("IDREF" == type || "ENTITY" == type) { - // VC: Entity Name (is a name) - // VC: IDREF (is a name) (is declared) - isName (value, "attribute default", aName); - if ("ENTITY" == type && !unparsed.contains (value)) - uDeferred.addElement (value); - - } else if ("IDREFS" == type || "ENTITIES" == type) { - // VC: Entity Name (is a name; at least one value) - // VC: IDREF (is a name; at least one value) - StringTokenizer names = new StringTokenizer (value); - if (!names.hasMoreTokens ()) - error ("Default for attribute '" + aName - + "' must have at least one name."); - else do { - String name = names.nextToken (); - isName (name, "attribute default", aName); - if ("ENTITIES" == type && !unparsed.contains (name)) - uDeferred.addElement (value); - } while (names.hasMoreTokens ()); - - } else if (type.charAt (0) == '(' /*)*/ ) { - // VC: Enumeration (must match) - checkEnumeration (value, type, aName); - - } else if (!interned && checkOne) { /* NOTATION */ - // VC: Notation attributes (must be names) - isName (value, "attribute default", aName); - - // VC: Notation attributes (must be declared) - if (!notations.contains (value)) - nDeferred.addElement (value); - - // VC: Enumeration (must match) - checkEnumeration (value, type, aName); - - } else if ("ID" != type) - throw new RuntimeException ("illegal attribute type: " + type); - } - - if (info.attributes.get (aName) == null) - info.attributes.put (aName, ainfo); - /* - else - warning ("Element '" + eName - + "' already has an attribute named '" + aName + "'"); - */ - - if ("xml:space".equals (aName)) { - if (!("(default|preserve)".equals (type) - || "(preserve|default)".equals (type) - // these next two are arguable; XHTML's DTD doesn't - // deserve errors. After all, it's not like any - // illegal _value_ could pass ... - || "(preserve)".equals (type) - || "(default)".equals (type) - )) - error ( - "xml:space attribute type must be like '(default|preserve)'" - + " not '" + type + "'" - ); - - } - super.attributeDecl (eName, aName, type, mode, value); + if (disableDeclarations) + return; + + ElementInfo info = (ElementInfo) elements.get (eName); + AttributeInfo ainfo = new AttributeInfo (); + boolean checkOne = false; + boolean interned = false; + + // cheap interning of type names and #FIXED, #REQUIRED + // for faster startElement (we can use "==") + for (int i = 0; i < types.length; i++) { + if (types [i].equals (type)) { + type = types [i]; + interned = true; + break; + } + } + if ("#FIXED".equals (mode)) + mode = "#FIXED"; + else if ("#REQUIRED".equals (mode)) + mode = "#REQUIRED"; + + ainfo.type = type; + ainfo.mode = mode; + ainfo.value = value; + + // we might not have seen the content model yet + if (info == null) { + info = new ElementInfo (eName); + elements.put (eName, info); + } + if ("ID" == type) { + checkOne = true; + if (!("#REQUIRED" == mode || "#IMPLIED".equals (mode))) { + // VC: ID Attribute Default + error ("ID attribute '" + aName + + "' must be #IMPLIED or #REQUIRED"); + } + + } else if (!interned && type.startsWith ("NOTATION ")) { + checkOne = true; + + // VC: Notation Attributes (notations must be declared) + StringTokenizer tokens = new StringTokenizer ( + type.substring (10, type.lastIndexOf (')')), + "|"); + while (tokens.hasMoreTokens ()) { + String token = tokens.nextToken (); + if (!notations.contains (token)) + nDeferred.addElement (token); + } + } + if (checkOne) { + for (Enumeration e = info.attributes.keys (); + e.hasMoreElements (); + /* NOP */) { + String name; + AttributeInfo ainfo2; + + name = (String) e.nextElement (); + ainfo2 = (AttributeInfo) info.attributes.get (name); + if (type == ainfo2.type || !interned /* NOTATION */) { + // VC: One ID per Element Type + // VC: One Notation per Element TYpe + error ("Element '" + eName + + "' already has an attribute of type " + + (interned ? "NOTATION" : type) + + " ('" + name + + "') so '" + aName + + "' is a validity error"); + } + } + } + + // VC: Attribute Default Legal + if (value != null) { + + if ("CDATA" == type) { + // event source rejected '<' + + } else if ("NMTOKEN" == type) { + // VC: Name Token (is a nmtoken) + isNmtoken (value, "attribute default", aName); + + } else if ("NMTOKENS" == type) { + // VC: Name Token (is a nmtoken; at least one value) + StringTokenizer tokens = new StringTokenizer (value); + if (!tokens.hasMoreTokens ()) + error ("Default for attribute '" + aName + + "' must have at least one name token."); + else do { + String token = tokens.nextToken (); + isNmtoken (token, "attribute default", aName); + } while (tokens.hasMoreTokens ()); + + } else if ("IDREF" == type || "ENTITY" == type) { + // VC: Entity Name (is a name) + // VC: IDREF (is a name) (is declared) + isName (value, "attribute default", aName); + if ("ENTITY" == type && !unparsed.contains (value)) + uDeferred.addElement (value); + + } else if ("IDREFS" == type || "ENTITIES" == type) { + // VC: Entity Name (is a name; at least one value) + // VC: IDREF (is a name; at least one value) + StringTokenizer names = new StringTokenizer (value); + if (!names.hasMoreTokens ()) + error ("Default for attribute '" + aName + + "' must have at least one name."); + else do { + String name = names.nextToken (); + isName (name, "attribute default", aName); + if ("ENTITIES" == type && !unparsed.contains (name)) + uDeferred.addElement (value); + } while (names.hasMoreTokens ()); + + } else if (type.charAt (0) == '(' /*)*/ ) { + // VC: Enumeration (must match) + checkEnumeration (value, type, aName); + + } else if (!interned && checkOne) { /* NOTATION */ + // VC: Notation attributes (must be names) + isName (value, "attribute default", aName); + + // VC: Notation attributes (must be declared) + if (!notations.contains (value)) + nDeferred.addElement (value); + + // VC: Enumeration (must match) + checkEnumeration (value, type, aName); + + } else if ("ID" != type) + throw new RuntimeException ("illegal attribute type: " + type); + } + + if (info.attributes.get (aName) == null) + info.attributes.put (aName, ainfo); + /* + else + warning ("Element '" + eName + + "' already has an attribute named '" + aName + "'"); + */ + + if ("xml:space".equals (aName)) { + if (!("(default|preserve)".equals (type) + || "(preserve|default)".equals (type) + // these next two are arguable; XHTML's DTD doesn't + // deserve errors. After all, it's not like any + // illegal _value_ could pass ... + || "(preserve)".equals (type) + || "(default)".equals (type) + )) + error ( + "xml:space attribute type must be like '(default|preserve)'" + + " not '" + type + "'" + ); + + } + super.attributeDecl (eName, aName, type, mode, value); } /** @@ -807,29 +807,29 @@ public final class ValidationConsumer extends EventFilter public void elementDecl (String name, String model) throws SAXException { - if (disableDeclarations) - return; - - ElementInfo info = (ElementInfo) elements.get (name); - - // we might have seen an attribute decl already - if (info == null) { - info = new ElementInfo (name); - elements.put (name, info); - } - if (info.model != null) { - // NOTE: not all parsers can report such duplicates. - // VC: Unique Element Type Declaration - error ("Element type '" + name - + "' was already declared."); - } else { - info.model = model; - - // VC: No Duplicate Types (in mixed content models) - if (model.charAt (1) == '#') // (#PCDATA... - info.getRecognizer (this); - } - super.elementDecl (name, model); + if (disableDeclarations) + return; + + ElementInfo info = (ElementInfo) elements.get (name); + + // we might have seen an attribute decl already + if (info == null) { + info = new ElementInfo (name); + elements.put (name, info); + } + if (info.model != null) { + // NOTE: not all parsers can report such duplicates. + // VC: Unique Element Type Declaration + error ("Element type '" + name + + "' was already declared."); + } else { + info.model = model; + + // VC: No Duplicate Types (in mixed content models) + if (model.charAt (1) == '#') // (#PCDATA... + info.getRecognizer (this); + } + super.elementDecl (name, model); } /** @@ -839,8 +839,8 @@ public final class ValidationConsumer extends EventFilter public void internalEntityDecl (String name, String value) throws SAXException { - if (!disableDeclarations) - super.internalEntityDecl (name, value); + if (!disableDeclarations) + super.internalEntityDecl (name, value); } /** @@ -848,11 +848,11 @@ public final class ValidationConsumer extends EventFilter * one was preloaded with a particular DTD */ public void externalEntityDecl (String name, - String publicId, String systemId) + String publicId, String systemId) throws SAXException { - if (!disableDeclarations) - super.externalEntityDecl (name, publicId, systemId); + if (!disableDeclarations) + super.externalEntityDecl (name, publicId, systemId); } @@ -865,11 +865,11 @@ public final class ValidationConsumer extends EventFilter public void notationDecl (String name, String publicId, String systemId) throws SAXException { - if (disableDeclarations) - return; + if (disableDeclarations) + return; - notations.addElement (name); - super.notationDecl (name, publicId, systemId); + notations.addElement (name); + super.notationDecl (name, publicId, systemId); } /** @@ -879,22 +879,22 @@ public final class ValidationConsumer extends EventFilter * unless this one was preloaded with a particular DTD. */ public void unparsedEntityDecl ( - String name, - String publicId, - String systemId, - String notationName + String name, + String publicId, + String systemId, + String notationName ) throws SAXException { - if (disableDeclarations) - return; + if (disableDeclarations) + return; - unparsed.addElement (name); - if (!notations.contains (notationName)) - nDeferred.addElement (notationName); - super.unparsedEntityDecl (name, publicId, systemId, notationName); + unparsed.addElement (name); + if (!notations.contains (notationName)) + nDeferred.addElement (notationName); + super.unparsedEntityDecl (name, publicId, systemId, notationName); } - - + + /** * <b>ContentHandler</b> Ensures that state from any previous parse * has been deleted. @@ -903,14 +903,14 @@ public final class ValidationConsumer extends EventFilter public void startDocument () throws SAXException { - resetState (); - super.startDocument (); + resetState (); + super.startDocument (); } private static boolean isAsciiLetter (char c) { - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } @@ -921,7 +921,7 @@ public final class ValidationConsumer extends EventFilter public void skippedEntity (String name) throws SAXException { - fatalError ("may not skip entities"); + fatalError ("may not skip entities"); } /* @@ -930,14 +930,14 @@ public final class ValidationConsumer extends EventFilter private String expandDefaultRefs (String s) throws SAXException { - if (s.indexOf ('&') < 0) - return s; - + if (s.indexOf ('&') < 0) + return s; + // FIXME: handle &#nn; &#xnn; &name; - String message = "Can't expand refs in attribute default: " + s; - warning (message); + String message = "Can't expand refs in attribute default: " + s; + warning (message); - return s; + return s; } /** @@ -946,248 +946,248 @@ public final class ValidationConsumer extends EventFilter * Passed to the next consumer. */ public void startElement ( - String uri, - String localName, - String qName, - Attributes atts + String uri, + String localName, + String qName, + Attributes atts ) throws SAXException { - // - // First check content model for the enclosing scope. - // - if (contentStack.isEmpty ()) { - // VC: Root Element Type - if (!qName.equals (rootName)) { - if (rootName == null) - warning ("This document has no DTD, can't be valid"); - else - error ("Root element type '" + qName - + "' was declared to be '" + rootName + "'"); - } - } else { - Recognizer state = (Recognizer) contentStack.peek (); - - if (state != null) { - Recognizer newstate = state.acceptElement (qName); - - if (newstate == null) - error ("Element type '" + qName - + "' in element '" + state.type.name - + "' violates content model " + state.type.model - ); - if (newstate != state) { - contentStack.pop (); - contentStack.push (newstate); - } - } - } - - // - // Then check that this element was declared, and push the - // object used to validate its content model onto our stack. - // - // This is where the recognizer gets created, if needed; if - // it's a "children" (elements) content model, an NDFA is - // created. (One recognizer is used per content type, no - // matter how complex that recognizer is.) - // - ElementInfo info; - - info = (ElementInfo) elements.get (qName); - if (info == null || info.model == null) { - // VC: Element Valid (base clause) - error ("Element type '" + qName + "' was not declared"); - contentStack.push (null); - - // for less diagnostic noise, fake a declaration. - elementDecl (qName, "ANY"); - } else - contentStack.push (info.getRecognizer (this)); - - // - // Then check each attribute present - // - int len; - String aname; - AttributeInfo ainfo; - - if (atts != null) - len = atts.getLength (); - else - len = 0; - - for (int i = 0; i < len; i++) { - aname = atts.getQName (i); - - if (info == null - || (ainfo = (AttributeInfo) info.attributes.get (aname)) - == null) { - // VC: Attribute Value Type - error ("Attribute '" + aname - + "' was not declared for element type " + qName); - continue; - } - - String value = atts.getValue (i); - - // note that "==" for type names and "#FIXED" is correct - // (and fast) since we've interned those literals. - - if ("#FIXED" == ainfo.mode) { - String expanded = expandDefaultRefs (ainfo.value); - - // VC: Fixed Attribute Default - if (!value.equals (expanded)) { - error ("Attribute '" + aname - + "' must match " + expanded - ); - continue; - } - } - - if ("CDATA" == ainfo.type) - continue; - - // - // For all other attribute types, there are various - // rules to follow. - // - - if ("ID" == ainfo.type) { - // VC: ID (must be a name) - if (isName (value, "ID attribute", aname)) { - if (Boolean.TRUE == ids.get (value)) - // VC: ID (appears once) - error ("ID attribute " + aname - + " uses an ID value '" + value - + "' which was already declared."); - else - // any forward refs are no longer problems - ids.put (value, Boolean.TRUE); - } - continue; - } - - if ("IDREF" == ainfo.type) { - // VC: IDREF (value must be a name) - if (isName (value, "IDREF attribute", aname)) { - // VC: IDREF (must match some ID attribute) - if (ids.get (value) == null) - // new -- assume it's a forward ref - ids.put (value, Boolean.FALSE); - } - continue; - } - - if ("IDREFS" == ainfo.type) { - StringTokenizer tokens = new StringTokenizer (value, " "); - - if (!tokens.hasMoreTokens ()) { - // VC: IDREF (one or more values) - error ("IDREFS attribute " + aname - + " must have at least one ID ref"); - } else do { - String id = tokens.nextToken (); - - // VC: IDREF (value must be a name) - if (isName (id, "IDREFS attribute", aname)) { - // VC: IDREF (must match some ID attribute) - if (ids.get (id) == null) - // new -- assume it's a forward ref - ids.put (id, Boolean.FALSE); - } - } while (tokens.hasMoreTokens ()); - continue; - } - - if ("NMTOKEN" == ainfo.type) { - // VC: Name Token (is a name token) - isNmtoken (value, "NMTOKEN attribute", aname); - continue; - } - - if ("NMTOKENS" == ainfo.type) { - StringTokenizer tokens = new StringTokenizer (value, " "); - - if (!tokens.hasMoreTokens ()) { - // VC: Name Token (one or more values) - error ("NMTOKENS attribute " + aname - + " must have at least one name token"); - } else do { - String token = tokens.nextToken (); - - // VC: Name Token (is a name token) - isNmtoken (token, "NMTOKENS attribute", aname); - } while (tokens.hasMoreTokens ()); - continue; - } - - if ("ENTITY" == ainfo.type) { - if (!unparsed.contains (value)) - // VC: Entity Name - error ("Value of attribute '" + aname - + "' refers to unparsed entity '" + value - + "' which was not declared."); - continue; - } - - if ("ENTITIES" == ainfo.type) { - StringTokenizer tokens = new StringTokenizer (value, " "); - - if (!tokens.hasMoreTokens ()) { - // VC: Entity Name (one or more values) - error ("ENTITIES attribute " + aname - + " must have at least one name token"); - } else do { - String entity = tokens.nextToken (); - - if (!unparsed.contains (entity)) - // VC: Entity Name - error ("Value of attribute '" + aname - + "' refers to unparsed entity '" + entity - + "' which was not declared."); - } while (tokens.hasMoreTokens ()); - continue; - } - - // - // check for enumerations last; more expensive - // - if (ainfo.type.charAt (0) == '(' /*)*/ - || ainfo.type.startsWith ("NOTATION ") - ) { - // VC: Enumeration (value must be defined) - checkEnumeration (value, ainfo.type, aname); - continue; - } - } - - // - // Last, check that all #REQUIRED attributes were provided - // - if (info != null) { - Hashtable table = info.attributes; - - if (table.size () != 0) { - Enumeration e = table.keys (); - - // XXX table.keys uses the heap, bleech -- slows things - - while (e.hasMoreElements ()) { - aname = (String) e.nextElement (); - ainfo = (AttributeInfo) table.get (aname); - - // "#REQUIRED" mode was interned in attributeDecl - if ("#REQUIRED" == ainfo.mode - && atts.getValue (aname) == null) { - // VC: Required Attribute - error ("Attribute '" + aname + "' must be specified " - + "for element type " + qName); - } - } - } - } - super.startElement (uri, localName, qName, atts); + // + // First check content model for the enclosing scope. + // + if (contentStack.isEmpty ()) { + // VC: Root Element Type + if (!qName.equals (rootName)) { + if (rootName == null) + warning ("This document has no DTD, can't be valid"); + else + error ("Root element type '" + qName + + "' was declared to be '" + rootName + "'"); + } + } else { + Recognizer state = (Recognizer) contentStack.peek (); + + if (state != null) { + Recognizer newstate = state.acceptElement (qName); + + if (newstate == null) + error ("Element type '" + qName + + "' in element '" + state.type.name + + "' violates content model " + state.type.model + ); + if (newstate != state) { + contentStack.pop (); + contentStack.push (newstate); + } + } + } + + // + // Then check that this element was declared, and push the + // object used to validate its content model onto our stack. + // + // This is where the recognizer gets created, if needed; if + // it's a "children" (elements) content model, an NDFA is + // created. (One recognizer is used per content type, no + // matter how complex that recognizer is.) + // + ElementInfo info; + + info = (ElementInfo) elements.get (qName); + if (info == null || info.model == null) { + // VC: Element Valid (base clause) + error ("Element type '" + qName + "' was not declared"); + contentStack.push (null); + + // for less diagnostic noise, fake a declaration. + elementDecl (qName, "ANY"); + } else + contentStack.push (info.getRecognizer (this)); + + // + // Then check each attribute present + // + int len; + String aname; + AttributeInfo ainfo; + + if (atts != null) + len = atts.getLength (); + else + len = 0; + + for (int i = 0; i < len; i++) { + aname = atts.getQName (i); + + if (info == null + || (ainfo = (AttributeInfo) info.attributes.get (aname)) + == null) { + // VC: Attribute Value Type + error ("Attribute '" + aname + + "' was not declared for element type " + qName); + continue; + } + + String value = atts.getValue (i); + + // note that "==" for type names and "#FIXED" is correct + // (and fast) since we've interned those literals. + + if ("#FIXED" == ainfo.mode) { + String expanded = expandDefaultRefs (ainfo.value); + + // VC: Fixed Attribute Default + if (!value.equals (expanded)) { + error ("Attribute '" + aname + + "' must match " + expanded + ); + continue; + } + } + + if ("CDATA" == ainfo.type) + continue; + + // + // For all other attribute types, there are various + // rules to follow. + // + + if ("ID" == ainfo.type) { + // VC: ID (must be a name) + if (isName (value, "ID attribute", aname)) { + if (Boolean.TRUE == ids.get (value)) + // VC: ID (appears once) + error ("ID attribute " + aname + + " uses an ID value '" + value + + "' which was already declared."); + else + // any forward refs are no longer problems + ids.put (value, Boolean.TRUE); + } + continue; + } + + if ("IDREF" == ainfo.type) { + // VC: IDREF (value must be a name) + if (isName (value, "IDREF attribute", aname)) { + // VC: IDREF (must match some ID attribute) + if (ids.get (value) == null) + // new -- assume it's a forward ref + ids.put (value, Boolean.FALSE); + } + continue; + } + + if ("IDREFS" == ainfo.type) { + StringTokenizer tokens = new StringTokenizer (value, " "); + + if (!tokens.hasMoreTokens ()) { + // VC: IDREF (one or more values) + error ("IDREFS attribute " + aname + + " must have at least one ID ref"); + } else do { + String id = tokens.nextToken (); + + // VC: IDREF (value must be a name) + if (isName (id, "IDREFS attribute", aname)) { + // VC: IDREF (must match some ID attribute) + if (ids.get (id) == null) + // new -- assume it's a forward ref + ids.put (id, Boolean.FALSE); + } + } while (tokens.hasMoreTokens ()); + continue; + } + + if ("NMTOKEN" == ainfo.type) { + // VC: Name Token (is a name token) + isNmtoken (value, "NMTOKEN attribute", aname); + continue; + } + + if ("NMTOKENS" == ainfo.type) { + StringTokenizer tokens = new StringTokenizer (value, " "); + + if (!tokens.hasMoreTokens ()) { + // VC: Name Token (one or more values) + error ("NMTOKENS attribute " + aname + + " must have at least one name token"); + } else do { + String token = tokens.nextToken (); + + // VC: Name Token (is a name token) + isNmtoken (token, "NMTOKENS attribute", aname); + } while (tokens.hasMoreTokens ()); + continue; + } + + if ("ENTITY" == ainfo.type) { + if (!unparsed.contains (value)) + // VC: Entity Name + error ("Value of attribute '" + aname + + "' refers to unparsed entity '" + value + + "' which was not declared."); + continue; + } + + if ("ENTITIES" == ainfo.type) { + StringTokenizer tokens = new StringTokenizer (value, " "); + + if (!tokens.hasMoreTokens ()) { + // VC: Entity Name (one or more values) + error ("ENTITIES attribute " + aname + + " must have at least one name token"); + } else do { + String entity = tokens.nextToken (); + + if (!unparsed.contains (entity)) + // VC: Entity Name + error ("Value of attribute '" + aname + + "' refers to unparsed entity '" + entity + + "' which was not declared."); + } while (tokens.hasMoreTokens ()); + continue; + } + + // + // check for enumerations last; more expensive + // + if (ainfo.type.charAt (0) == '(' /*)*/ + || ainfo.type.startsWith ("NOTATION ") + ) { + // VC: Enumeration (value must be defined) + checkEnumeration (value, ainfo.type, aname); + continue; + } + } + + // + // Last, check that all #REQUIRED attributes were provided + // + if (info != null) { + Hashtable table = info.attributes; + + if (table.size () != 0) { + Enumeration e = table.keys (); + + // XXX table.keys uses the heap, bleech -- slows things + + while (e.hasMoreElements ()) { + aname = (String) e.nextElement (); + ainfo = (AttributeInfo) table.get (aname); + + // "#REQUIRED" mode was interned in attributeDecl + if ("#REQUIRED" == ainfo.mode + && atts.getValue (aname) == null) { + // VC: Required Attribute + error ("Attribute '" + aname + "' must be specified " + + "for element type " + qName); + } + } + } + } + super.startElement (uri, localName, qName, atts); } /** @@ -1198,25 +1198,25 @@ public final class ValidationConsumer extends EventFilter public void characters (char ch [], int start, int length) throws SAXException { - Recognizer state; - - if (contentStack.empty ()) - state = null; - else - state = (Recognizer) contentStack.peek (); - - // NOTE: if this ever supports with SAX parsers that don't - // report ignorable whitespace as such (only XP?), this class - // needs to morph it into ignorableWhitespace() as needed ... - - if (state != null && !state.acceptCharacters ()) - // VC: Element Valid (clauses three, four -- see recognizer) - error ("Character content not allowed in element " - + state.type.name); - - super.characters (ch, start, length); + Recognizer state; + + if (contentStack.empty ()) + state = null; + else + state = (Recognizer) contentStack.peek (); + + // NOTE: if this ever supports with SAX parsers that don't + // report ignorable whitespace as such (only XP?), this class + // needs to morph it into ignorableWhitespace() as needed ... + + if (state != null && !state.acceptCharacters ()) + // VC: Element Valid (clauses three, four -- see recognizer) + error ("Character content not allowed in element " + + state.type.name); + + super.characters (ch, start, length); } - + /** * <b>ContentHandler</b> Reports a validity error if the element's content @@ -1227,95 +1227,95 @@ public final class ValidationConsumer extends EventFilter public void endElement (String uri, String localName, String qName) throws SAXException { - try { - Recognizer state = (Recognizer) contentStack.pop (); - - if (state != null && !state.completed ()) - // VC: Element valid (clauses two, three, four; see Recognizer) - error ("Premature end for element '" - + state.type.name - + "', content model " - + state.type.model); - - // could insist on match of start element, but that's - // something the input stream must to guarantee. - - } catch (EmptyStackException e) { - fatalError ("endElement without startElement: " + qName - + ((uri == null) - ? "" - : ( " { '" + uri + "', " + localName + " }"))); - } - super.endElement (uri, localName, qName); + try { + Recognizer state = (Recognizer) contentStack.pop (); + + if (state != null && !state.completed ()) + // VC: Element valid (clauses two, three, four; see Recognizer) + error ("Premature end for element '" + + state.type.name + + "', content model " + + state.type.model); + + // could insist on match of start element, but that's + // something the input stream must to guarantee. + + } catch (EmptyStackException e) { + fatalError ("endElement without startElement: " + qName + + ((uri == null) + ? "" + : ( " { '" + uri + "', " + localName + " }"))); + } + super.endElement (uri, localName, qName); } /** * <b>ContentHandler</b> Checks whether all ID values that were - * referenced have been declared, and releases all resources. + * referenced have been declared, and releases all resources. * Passed to the next consumer. - * + * * @see #setDocumentLocator */ public void endDocument () throws SAXException { - for (Enumeration idNames = ids.keys (); - idNames.hasMoreElements (); - /* NOP */) { - String id = (String) idNames.nextElement (); - - if (Boolean.FALSE == ids.get (id)) { - // VC: IDREF (must match ID) - error ("Undeclared ID value '" + id - + "' was referred to by an IDREF/IDREFS attribute"); - } - } - - resetState (); - super.endDocument (); + for (Enumeration idNames = ids.keys (); + idNames.hasMoreElements (); + /* NOP */) { + String id = (String) idNames.nextElement (); + + if (Boolean.FALSE == ids.get (id)) { + // VC: IDREF (must match ID) + error ("Undeclared ID value '" + id + + "' was referred to by an IDREF/IDREFS attribute"); + } + } + + resetState (); + super.endDocument (); } /** Holds per-element declarations */ static private final class ElementInfo { - String name; - String model; - - // key = attribute name; value = AttributeInfo - Hashtable attributes = new Hashtable (11); - - ElementInfo (String n) { name = n; } - - private Recognizer recognizer; - - // for validating content models: one per type, shared, - // and constructed only on demand ... so unused elements do - // not need to consume resources. - Recognizer getRecognizer (ValidationConsumer consumer) - throws SAXException - { - if (recognizer == null) { - if ("ANY".equals (model)) - recognizer = ANY; - else if ("EMPTY".equals (model)) - recognizer = new EmptyRecognizer (this); - else if ('#' == model.charAt (1)) - // n.b. this constructor does a validity check - recognizer = new MixedRecognizer (this, consumer); - else - recognizer = new ChildrenRecognizer (this, consumer); - } - return recognizer; - } + String name; + String model; + + // key = attribute name; value = AttributeInfo + Hashtable attributes = new Hashtable (11); + + ElementInfo (String n) { name = n; } + + private Recognizer recognizer; + + // for validating content models: one per type, shared, + // and constructed only on demand ... so unused elements do + // not need to consume resources. + Recognizer getRecognizer (ValidationConsumer consumer) + throws SAXException + { + if (recognizer == null) { + if ("ANY".equals (model)) + recognizer = ANY; + else if ("EMPTY".equals (model)) + recognizer = new EmptyRecognizer (this); + else if ('#' == model.charAt (1)) + // n.b. this constructor does a validity check + recognizer = new MixedRecognizer (this, consumer); + else + recognizer = new ChildrenRecognizer (this, consumer); + } + return recognizer; + } } /** Holds per-attribute declarations */ static private final class AttributeInfo { - String type; - String mode; // #REQUIRED, etc (or null) - String value; // or null + String type; + String mode; // #REQUIRED, etc (or null) + String value; // or null } @@ -1323,120 +1323,120 @@ public final class ValidationConsumer extends EventFilter // Content model validation // - static private final Recognizer ANY = new Recognizer (null); + static private final Recognizer ANY = new Recognizer (null); // Base class defines the calls used to validate content, // and supports the "ANY" content model static private class Recognizer { - final ElementInfo type; - - Recognizer (ElementInfo t) { type = t; } - - // return true iff character data is legal here - boolean acceptCharacters () - throws SAXException - // VC: Element Valid (third and fourth clauses) - { return true; } - - // null return = failure - // otherwise, next state (like an FSM) - // prerequisite: tested that name was declared - Recognizer acceptElement (String name) - throws SAXException - // VC: Element Valid (fourth clause) - { return this; } - - // return true iff model is completed, can finish - boolean completed () - throws SAXException - // VC: Element Valid (fourth clause) - { return true; } - - public String toString () - // n.b. "children" is the interesting case! - { return (type == null) ? "ANY" : type.model; } + final ElementInfo type; + + Recognizer (ElementInfo t) { type = t; } + + // return true iff character data is legal here + boolean acceptCharacters () + throws SAXException + // VC: Element Valid (third and fourth clauses) + { return true; } + + // null return = failure + // otherwise, next state (like an FSM) + // prerequisite: tested that name was declared + Recognizer acceptElement (String name) + throws SAXException + // VC: Element Valid (fourth clause) + { return this; } + + // return true iff model is completed, can finish + boolean completed () + throws SAXException + // VC: Element Valid (fourth clause) + { return true; } + + public String toString () + // n.b. "children" is the interesting case! + { return (type == null) ? "ANY" : type.model; } } // "EMPTY" content model -- no characters or elements private static final class EmptyRecognizer extends Recognizer { - public EmptyRecognizer (ElementInfo type) - { super (type); } + public EmptyRecognizer (ElementInfo type) + { super (type); } - // VC: Element Valid (first clause) - boolean acceptCharacters () - { return false; } + // VC: Element Valid (first clause) + boolean acceptCharacters () + { return false; } - // VC: Element Valid (first clause) - Recognizer acceptElement (String name) - { return null; } + // VC: Element Valid (first clause) + Recognizer acceptElement (String name) + { return null; } } // "Mixed" content model -- ANY, but restricts elements private static final class MixedRecognizer extends Recognizer { - private String permitted []; - - // N.B. constructor tests for duplicated element names (VC) - public MixedRecognizer (ElementInfo t, ValidationConsumer v) - throws SAXException - { - super (t); - - // (#PCDATA...)* or (#PCDATA) ==> ... or empty - // with the "..." being "|elname|..." - StringTokenizer tokens = new StringTokenizer ( - t.model.substring (8, t.model.lastIndexOf (')')), - "|"); - Vector vec = new Vector (); - - while (tokens.hasMoreTokens ()) { - String token = tokens.nextToken (); - - if (vec.contains (token)) - v.error ("element " + token - + " is repeated in mixed content model: " - + t.model); - else - vec.addElement (token.intern ()); - } - permitted = new String [vec.size ()]; - for (int i = 0; i < permitted.length; i++) - permitted [i] = (String) vec.elementAt (i); - - // in one large machine-derived DTD sample, most of about - // 250 mixed content models were empty, and 25 had ten or - // more entries. 2 had over a hundred elements. Linear - // search isn't obviously wrong. - } - - // VC: Element Valid (third clause) - Recognizer acceptElement (String name) - { - int length = permitted.length; - - // first pass -- optimistic w.r.t. event source interning - // (and document validity) - for (int i = 0; i < length; i++) - if (permitted [i] == name) - return this; - // second pass -- pessimistic w.r.t. event source interning - for (int i = 0; i < length; i++) - if (permitted [i].equals (name)) - return this; - return null; - } + private String permitted []; + + // N.B. constructor tests for duplicated element names (VC) + public MixedRecognizer (ElementInfo t, ValidationConsumer v) + throws SAXException + { + super (t); + + // (#PCDATA...)* or (#PCDATA) ==> ... or empty + // with the "..." being "|elname|..." + StringTokenizer tokens = new StringTokenizer ( + t.model.substring (8, t.model.lastIndexOf (')')), + "|"); + Vector vec = new Vector (); + + while (tokens.hasMoreTokens ()) { + String token = tokens.nextToken (); + + if (vec.contains (token)) + v.error ("element " + token + + " is repeated in mixed content model: " + + t.model); + else + vec.addElement (token.intern ()); + } + permitted = new String [vec.size ()]; + for (int i = 0; i < permitted.length; i++) + permitted [i] = (String) vec.elementAt (i); + + // in one large machine-derived DTD sample, most of about + // 250 mixed content models were empty, and 25 had ten or + // more entries. 2 had over a hundred elements. Linear + // search isn't obviously wrong. + } + + // VC: Element Valid (third clause) + Recognizer acceptElement (String name) + { + int length = permitted.length; + + // first pass -- optimistic w.r.t. event source interning + // (and document validity) + for (int i = 0; i < length; i++) + if (permitted [i] == name) + return this; + // second pass -- pessimistic w.r.t. event source interning + for (int i = 0; i < length; i++) + if (permitted [i].equals (name)) + return this; + return null; + } } // recognizer loop flags, see later - private static final int F_LOOPHEAD = 0x01; - private static final int F_LOOPNEXT = 0x02; + private static final int F_LOOPHEAD = 0x01; + private static final int F_LOOPNEXT = 0x02; // for debugging -- used to label/count nodes in toString() - private static int nodeCount; + private static int nodeCount; /** * "Children" content model -- these are nodes in NDFA state graphs. @@ -1463,466 +1463,466 @@ public final class ValidationConsumer extends EventFilter * graph to have one exit node (or more EMPTY nodes). */ private static final class ChildrenRecognizer extends Recognizer - implements Cloneable + implements Cloneable { - // for reporting non-deterministic content models - // ... a waste of space if we're not reporting those! - // ... along with the 'model' member (in base class) - private ValidationConsumer consumer; - - // for CHOICE nodes -- each component is an arc that - // accepts a different NAME (or is EMPTY indicating - // NDFA termination). - private Recognizer components []; - - // for NAME/SEQUENCE nodes -- accepts that NAME and - // then goes to the next node (CHOICE, NAME, EMPTY). - private String name; - private Recognizer next; - - // loops always point back to a CHOICE node. we mark such choice - // nodes (F_LOOPHEAD) for diagnostics and faster deep cloning. - // We also mark nodes before back pointers (F_LOOPNEXT), to ensure - // termination when we patch sequences and loops. - private int flags; - - - // prevent a needless indirection between 'this' and 'node' - private void copyIn (ChildrenRecognizer node) - { - // model & consumer are already set - components = node.components; - name = node.name; - next = node.next; - flags = node.flags; - } - - // used to construct top level "children" content models, - public ChildrenRecognizer (ElementInfo type, ValidationConsumer vc) - { - this (vc, type); - populate (type.model.toCharArray (), 0); - patchNext (new EmptyRecognizer (type), null); - } - - // used internally; populating is separate - private ChildrenRecognizer (ValidationConsumer vc, ElementInfo type) - { - super (type); - consumer = vc; - } - - - // - // When rewriting some graph nodes we need deep clones in one case; - // mostly shallow clones (what the JVM handles for us) are fine. - // - private ChildrenRecognizer shallowClone () - { - try { - return (ChildrenRecognizer) clone (); - } catch (CloneNotSupportedException e) { - throw new Error ("clone"); - } - } - - private ChildrenRecognizer deepClone () - { - return deepClone (new Hashtable (37)); - } - - private ChildrenRecognizer deepClone (Hashtable table) - { - ChildrenRecognizer retval; - - if ((flags & F_LOOPHEAD) != 0) { - retval = (ChildrenRecognizer) table.get (this); - if (retval != null) - return this; - - retval = shallowClone (); - table.put (this, retval); - } else - retval = shallowClone (); - - if (next != null) { - if (next instanceof ChildrenRecognizer) - retval.next = ((ChildrenRecognizer)next) - .deepClone (table); - else if (!(next instanceof EmptyRecognizer)) - throw new RuntimeException ("deepClone"); - } - - if (components != null) { - retval.components = new Recognizer [components.length]; - for (int i = 0; i < components.length; i++) { - Recognizer temp = components [i]; - - if (temp == null) - retval.components [i] = null; - else if (temp instanceof ChildrenRecognizer) - retval.components [i] = ((ChildrenRecognizer)temp) - .deepClone (table); - else if (!(temp instanceof EmptyRecognizer)) - throw new RuntimeException ("deepClone"); - } - } - - return retval; - } - - // connect subgraphs, first to next (sequencing) - private void patchNext (Recognizer theNext, Hashtable table) - { - // backpointers must not be repatched or followed - if ((flags & F_LOOPNEXT) != 0) - return; - - // XXX this table "shouldn't" be needed, right? - // but some choice nodes looped if it isn't there. - if (table != null && table.get (this) != null) - return; - if (table == null) - table = new Hashtable (); - - // NAME/SEQUENCE - if (name != null) { - if (next == null) - next = theNext; - else if (next instanceof ChildrenRecognizer) { - ((ChildrenRecognizer)next).patchNext (theNext, table); - } else if (!(next instanceof EmptyRecognizer)) - throw new RuntimeException ("patchNext"); - return; - } - - // CHOICE - for (int i = 0; i < components.length; i++) { - if (components [i] == null) - components [i] = theNext; - else if (components [i] instanceof ChildrenRecognizer) { - ((ChildrenRecognizer)components [i]) - .patchNext (theNext, table); - } else if (!(components [i] instanceof EmptyRecognizer)) - throw new RuntimeException ("patchNext"); - } - - if (table != null && (flags & F_LOOPHEAD) != 0) - table.put (this, this); - } - - /** - * Parses a 'children' spec (or recursively 'cp') and makes this - * become a regular graph node. - * - * @return index after this particle - */ - private int populate (char parseBuf [], int startPos) - { - int nextPos = startPos + 1; - char c; - - if (nextPos < 0 || nextPos >= parseBuf.length) - throw new IndexOutOfBoundsException (); - - // Grammar of the string is from the XML spec, but - // with whitespace removed by the SAX parser. - - // children ::= (choice | seq) ('?' | '*' | '+')? - // cp ::= (Name | choice | seq) ('?' | '*' | '+')? - // choice ::= '(' cp ('|' choice)* ')' - // seq ::= '(' cp (',' choice)* ')' - - // interior nodes only - // cp ::= name ... - if (parseBuf [startPos] != '('/*)*/) { - boolean done = false; - do { - switch (c = parseBuf [nextPos]) { - case '?': case '*': case '+': - case '|': case ',': - case /*(*/ ')': - done = true; - continue; - default: - nextPos++; - continue; - } - } while (!done); - name = new String (parseBuf, startPos, nextPos - startPos); - - // interior OR toplevel nodes - // cp ::= choice .. - // cp ::= seq .. - } else { - // collect everything as a separate list, and merge it - // into "this" later if we can (SEQUENCE or singleton) - ChildrenRecognizer first; - - first = new ChildrenRecognizer (consumer, type); - nextPos = first.populate (parseBuf, nextPos); - c = parseBuf [nextPos++]; - - if (c == ',' || c == '|') { - ChildrenRecognizer current = first; - char separator = c; - Vector v = null; - - if (separator == '|') { - v = new Vector (); - v.addElement (first); - } - - do { - ChildrenRecognizer link; - - link = new ChildrenRecognizer (consumer, type); - nextPos = link.populate (parseBuf, nextPos); - - if (separator == ',') { - current.patchNext (link, null); - current = link; - } else - v.addElement (link); - - c = parseBuf [nextPos++]; - } while (c == separator); - - // choice ... collect everything into one array. - if (separator == '|') { - // assert v.size() > 1 - components = new Recognizer [v.size ()]; - for (int i = 0; i < components.length; i++) { - components [i] = (Recognizer) - v.elementAt (i); - } - // assert flags == 0 - - // sequence ... merge into "this" to be smaller. - } else - copyIn (first); - - // treat singletons like one-node sequences. - } else - copyIn (first); - - if (c != /*(*/ ')') - throw new RuntimeException ("corrupt content model"); - } - - // - // Arity is optional, and the root of all fun. We keep the - // FSM state graph simple by only having NAME/SEQUENCE and - // CHOICE nodes (or EMPTY to terminate a model), easily - // evaluated. So we rewrite each node that has arity, using - // those primitives. We create loops here, if needed. - // - if (nextPos < parseBuf.length) { - c = parseBuf [nextPos]; - if (c == '?' || c == '*' || c == '+') { - nextPos++; - - // Rewrite 'zero-or-one' "?" arity to a CHOICE: - // - SEQUENCE (clone, what's next) - // - or, what's next - // Size cost: N --> N + 1 - if (c == '?') { - Recognizer once = shallowClone (); - - components = new Recognizer [2]; - components [0] = once; - // components [1] initted to null - name = null; - next = null; - flags = 0; - - - // Rewrite 'zero-or-more' "*" arity to a CHOICE. - // - LOOP (clone, back to this CHOICE) - // - or, what's next - // Size cost: N --> N + 1 - } else if (c == '*') { - ChildrenRecognizer loop = shallowClone (); - - loop.patchNext (this, null); - loop.flags |= F_LOOPNEXT; - flags = F_LOOPHEAD; - - components = new Recognizer [2]; - components [0] = loop; - // components [1] initted to null - name = null; - next = null; - - - // Rewrite 'one-or-more' "+" arity to a SEQUENCE. - // Basically (a)+ --> ((a),(a)*). - // - this - // - CHOICE - // * LOOP (clone, back to the CHOICE) - // * or, whatever's next - // Size cost: N --> 2N + 1 - } else if (c == '+') { - ChildrenRecognizer loop = deepClone (); - ChildrenRecognizer choice; - - choice = new ChildrenRecognizer (consumer, type); - loop.patchNext (choice, null); - loop.flags |= F_LOOPNEXT; - choice.flags = F_LOOPHEAD; - - choice.components = new Recognizer [2]; - choice.components [0] = loop; - // choice.components [1] initted to null - // choice.name, choice.next initted to null - - patchNext (choice, null); - } - } - } - - return nextPos; - } - - // VC: Element Valid (second clause) - boolean acceptCharacters () - { return false; } - - // VC: Element Valid (second clause) - Recognizer acceptElement (String type) - throws SAXException - { - // NAME/SEQUENCE - if (name != null) { - if (name.equals (type)) - return next; - return null; - } - - // CHOICE ... optionally reporting nondeterminism we - // run across. we won't check out every transition - // for nondeterminism; only the ones we follow. - Recognizer retval = null; - - for (int i = 0; i < components.length; i++) { - Recognizer temp = components [i].acceptElement (type); - - if (temp == null) - continue; - else if (!warnNonDeterministic) - return temp; - else if (retval == null) - retval = temp; - else if (retval != temp) - consumer.error ("Content model " + this.type.model - + " is non-deterministic for " + type); - } - return retval; - } - - // VC: Element Valid (second clause) - boolean completed () - throws SAXException - { - // expecting a specific element - if (name != null) - return false; - - // choice, some sequences - for (int i = 0; i < components.length; i++) { - if (components [i].completed ()) - return true; - } - - return false; - } + // for reporting non-deterministic content models + // ... a waste of space if we're not reporting those! + // ... along with the 'model' member (in base class) + private ValidationConsumer consumer; + + // for CHOICE nodes -- each component is an arc that + // accepts a different NAME (or is EMPTY indicating + // NDFA termination). + private Recognizer components []; + + // for NAME/SEQUENCE nodes -- accepts that NAME and + // then goes to the next node (CHOICE, NAME, EMPTY). + private String name; + private Recognizer next; + + // loops always point back to a CHOICE node. we mark such choice + // nodes (F_LOOPHEAD) for diagnostics and faster deep cloning. + // We also mark nodes before back pointers (F_LOOPNEXT), to ensure + // termination when we patch sequences and loops. + private int flags; + + + // prevent a needless indirection between 'this' and 'node' + private void copyIn (ChildrenRecognizer node) + { + // model & consumer are already set + components = node.components; + name = node.name; + next = node.next; + flags = node.flags; + } + + // used to construct top level "children" content models, + public ChildrenRecognizer (ElementInfo type, ValidationConsumer vc) + { + this (vc, type); + populate (type.model.toCharArray (), 0); + patchNext (new EmptyRecognizer (type), null); + } + + // used internally; populating is separate + private ChildrenRecognizer (ValidationConsumer vc, ElementInfo type) + { + super (type); + consumer = vc; + } + + + // + // When rewriting some graph nodes we need deep clones in one case; + // mostly shallow clones (what the JVM handles for us) are fine. + // + private ChildrenRecognizer shallowClone () + { + try { + return (ChildrenRecognizer) clone (); + } catch (CloneNotSupportedException e) { + throw new Error ("clone"); + } + } + + private ChildrenRecognizer deepClone () + { + return deepClone (new Hashtable (37)); + } + + private ChildrenRecognizer deepClone (Hashtable table) + { + ChildrenRecognizer retval; + + if ((flags & F_LOOPHEAD) != 0) { + retval = (ChildrenRecognizer) table.get (this); + if (retval != null) + return this; + + retval = shallowClone (); + table.put (this, retval); + } else + retval = shallowClone (); + + if (next != null) { + if (next instanceof ChildrenRecognizer) + retval.next = ((ChildrenRecognizer)next) + .deepClone (table); + else if (!(next instanceof EmptyRecognizer)) + throw new RuntimeException ("deepClone"); + } + + if (components != null) { + retval.components = new Recognizer [components.length]; + for (int i = 0; i < components.length; i++) { + Recognizer temp = components [i]; + + if (temp == null) + retval.components [i] = null; + else if (temp instanceof ChildrenRecognizer) + retval.components [i] = ((ChildrenRecognizer)temp) + .deepClone (table); + else if (!(temp instanceof EmptyRecognizer)) + throw new RuntimeException ("deepClone"); + } + } + + return retval; + } + + // connect subgraphs, first to next (sequencing) + private void patchNext (Recognizer theNext, Hashtable table) + { + // backpointers must not be repatched or followed + if ((flags & F_LOOPNEXT) != 0) + return; + + // XXX this table "shouldn't" be needed, right? + // but some choice nodes looped if it isn't there. + if (table != null && table.get (this) != null) + return; + if (table == null) + table = new Hashtable (); + + // NAME/SEQUENCE + if (name != null) { + if (next == null) + next = theNext; + else if (next instanceof ChildrenRecognizer) { + ((ChildrenRecognizer)next).patchNext (theNext, table); + } else if (!(next instanceof EmptyRecognizer)) + throw new RuntimeException ("patchNext"); + return; + } + + // CHOICE + for (int i = 0; i < components.length; i++) { + if (components [i] == null) + components [i] = theNext; + else if (components [i] instanceof ChildrenRecognizer) { + ((ChildrenRecognizer)components [i]) + .patchNext (theNext, table); + } else if (!(components [i] instanceof EmptyRecognizer)) + throw new RuntimeException ("patchNext"); + } + + if (table != null && (flags & F_LOOPHEAD) != 0) + table.put (this, this); + } + + /** + * Parses a 'children' spec (or recursively 'cp') and makes this + * become a regular graph node. + * + * @return index after this particle + */ + private int populate (char parseBuf [], int startPos) + { + int nextPos = startPos + 1; + char c; + + if (nextPos < 0 || nextPos >= parseBuf.length) + throw new IndexOutOfBoundsException (); + + // Grammar of the string is from the XML spec, but + // with whitespace removed by the SAX parser. + + // children ::= (choice | seq) ('?' | '*' | '+')? + // cp ::= (Name | choice | seq) ('?' | '*' | '+')? + // choice ::= '(' cp ('|' choice)* ')' + // seq ::= '(' cp (',' choice)* ')' + + // interior nodes only + // cp ::= name ... + if (parseBuf [startPos] != '('/*)*/) { + boolean done = false; + do { + switch (c = parseBuf [nextPos]) { + case '?': case '*': case '+': + case '|': case ',': + case /*(*/ ')': + done = true; + continue; + default: + nextPos++; + continue; + } + } while (!done); + name = new String (parseBuf, startPos, nextPos - startPos); + + // interior OR toplevel nodes + // cp ::= choice .. + // cp ::= seq .. + } else { + // collect everything as a separate list, and merge it + // into "this" later if we can (SEQUENCE or singleton) + ChildrenRecognizer first; + + first = new ChildrenRecognizer (consumer, type); + nextPos = first.populate (parseBuf, nextPos); + c = parseBuf [nextPos++]; + + if (c == ',' || c == '|') { + ChildrenRecognizer current = first; + char separator = c; + Vector v = null; + + if (separator == '|') { + v = new Vector (); + v.addElement (first); + } + + do { + ChildrenRecognizer link; + + link = new ChildrenRecognizer (consumer, type); + nextPos = link.populate (parseBuf, nextPos); + + if (separator == ',') { + current.patchNext (link, null); + current = link; + } else + v.addElement (link); + + c = parseBuf [nextPos++]; + } while (c == separator); + + // choice ... collect everything into one array. + if (separator == '|') { + // assert v.size() > 1 + components = new Recognizer [v.size ()]; + for (int i = 0; i < components.length; i++) { + components [i] = (Recognizer) + v.elementAt (i); + } + // assert flags == 0 + + // sequence ... merge into "this" to be smaller. + } else + copyIn (first); + + // treat singletons like one-node sequences. + } else + copyIn (first); + + if (c != /*(*/ ')') + throw new RuntimeException ("corrupt content model"); + } + + // + // Arity is optional, and the root of all fun. We keep the + // FSM state graph simple by only having NAME/SEQUENCE and + // CHOICE nodes (or EMPTY to terminate a model), easily + // evaluated. So we rewrite each node that has arity, using + // those primitives. We create loops here, if needed. + // + if (nextPos < parseBuf.length) { + c = parseBuf [nextPos]; + if (c == '?' || c == '*' || c == '+') { + nextPos++; + + // Rewrite 'zero-or-one' "?" arity to a CHOICE: + // - SEQUENCE (clone, what's next) + // - or, what's next + // Size cost: N --> N + 1 + if (c == '?') { + Recognizer once = shallowClone (); + + components = new Recognizer [2]; + components [0] = once; + // components [1] initted to null + name = null; + next = null; + flags = 0; + + + // Rewrite 'zero-or-more' "*" arity to a CHOICE. + // - LOOP (clone, back to this CHOICE) + // - or, what's next + // Size cost: N --> N + 1 + } else if (c == '*') { + ChildrenRecognizer loop = shallowClone (); + + loop.patchNext (this, null); + loop.flags |= F_LOOPNEXT; + flags = F_LOOPHEAD; + + components = new Recognizer [2]; + components [0] = loop; + // components [1] initted to null + name = null; + next = null; + + + // Rewrite 'one-or-more' "+" arity to a SEQUENCE. + // Basically (a)+ --> ((a),(a)*). + // - this + // - CHOICE + // * LOOP (clone, back to the CHOICE) + // * or, whatever's next + // Size cost: N --> 2N + 1 + } else if (c == '+') { + ChildrenRecognizer loop = deepClone (); + ChildrenRecognizer choice; + + choice = new ChildrenRecognizer (consumer, type); + loop.patchNext (choice, null); + loop.flags |= F_LOOPNEXT; + choice.flags = F_LOOPHEAD; + + choice.components = new Recognizer [2]; + choice.components [0] = loop; + // choice.components [1] initted to null + // choice.name, choice.next initted to null + + patchNext (choice, null); + } + } + } + + return nextPos; + } + + // VC: Element Valid (second clause) + boolean acceptCharacters () + { return false; } + + // VC: Element Valid (second clause) + Recognizer acceptElement (String type) + throws SAXException + { + // NAME/SEQUENCE + if (name != null) { + if (name.equals (type)) + return next; + return null; + } + + // CHOICE ... optionally reporting nondeterminism we + // run across. we won't check out every transition + // for nondeterminism; only the ones we follow. + Recognizer retval = null; + + for (int i = 0; i < components.length; i++) { + Recognizer temp = components [i].acceptElement (type); + + if (temp == null) + continue; + else if (!warnNonDeterministic) + return temp; + else if (retval == null) + retval = temp; + else if (retval != temp) + consumer.error ("Content model " + this.type.model + + " is non-deterministic for " + type); + } + return retval; + } + + // VC: Element Valid (second clause) + boolean completed () + throws SAXException + { + // expecting a specific element + if (name != null) + return false; + + // choice, some sequences + for (int i = 0; i < components.length; i++) { + if (components [i].completed ()) + return true; + } + + return false; + } /** / - // FOR DEBUGGING ... flattens the graph for printing. - - public String toString () - { - StringBuffer buf = new StringBuffer (); - - // only one set of loop labels can be generated - // at a time... - synchronized (ANY) { - nodeCount = 0; - - toString (buf, new Hashtable ()); - return buf.toString (); - } - } - - private void toString (StringBuffer buf, Hashtable table) - { - // When we visit a node, label and count it. - // Nodes are never visited/counted more than once. - // For small models labels waste space, but if arity - // mappings were used the savings are substantial. - // (Plus, the output can be more readily understood.) - String temp = (String) table.get (this); - - if (temp != null) { - buf.append ('{'); - buf.append (temp); - buf.append ('}'); - return; - } else { - StringBuffer scratch = new StringBuffer (15); - - if ((flags & F_LOOPHEAD) != 0) - scratch.append ("loop"); - else - scratch.append ("node"); - scratch.append ('-'); - scratch.append (++nodeCount); - temp = scratch.toString (); - - table.put (this, temp); - buf.append ('['); - buf.append (temp); - buf.append (']'); - buf.append (':'); - } - - // NAME/SEQUENCE - if (name != null) { - // n.b. some output encodings turn some name chars into '?' - // e.g. with Japanese names and ASCII output - buf.append (name); - if (components != null) // bug! - buf.append ('$'); - if (next == null) - buf.append (",*"); - else if (next instanceof EmptyRecognizer) // patch-to-next - buf.append (",{}"); - else if (next instanceof ChildrenRecognizer) { - buf.append (','); - ((ChildrenRecognizer)next).toString (buf, table); - } else // bug! - buf.append (",+"); - return; - } - - // CHOICE - buf.append ("<"); - for (int i = 0; i < components.length; i++) { - if (i != 0) - buf.append ("|"); - if (components [i] instanceof EmptyRecognizer) { - buf.append ("{}"); - } else if (components [i] == null) { // patch-to-next - buf.append ('*'); - } else { - ChildrenRecognizer r; - - r = (ChildrenRecognizer) components [i]; - r.toString (buf, table); - } - } - buf.append (">"); - } + // FOR DEBUGGING ... flattens the graph for printing. + + public String toString () + { + StringBuffer buf = new StringBuffer (); + + // only one set of loop labels can be generated + // at a time... + synchronized (ANY) { + nodeCount = 0; + + toString (buf, new Hashtable ()); + return buf.toString (); + } + } + + private void toString (StringBuffer buf, Hashtable table) + { + // When we visit a node, label and count it. + // Nodes are never visited/counted more than once. + // For small models labels waste space, but if arity + // mappings were used the savings are substantial. + // (Plus, the output can be more readily understood.) + String temp = (String) table.get (this); + + if (temp != null) { + buf.append ('{'); + buf.append (temp); + buf.append ('}'); + return; + } else { + StringBuffer scratch = new StringBuffer (15); + + if ((flags & F_LOOPHEAD) != 0) + scratch.append ("loop"); + else + scratch.append ("node"); + scratch.append ('-'); + scratch.append (++nodeCount); + temp = scratch.toString (); + + table.put (this, temp); + buf.append ('['); + buf.append (temp); + buf.append (']'); + buf.append (':'); + } + + // NAME/SEQUENCE + if (name != null) { + // n.b. some output encodings turn some name chars into '?' + // e.g. with Japanese names and ASCII output + buf.append (name); + if (components != null) // bug! + buf.append ('$'); + if (next == null) + buf.append (",*"); + else if (next instanceof EmptyRecognizer) // patch-to-next + buf.append (",{}"); + else if (next instanceof ChildrenRecognizer) { + buf.append (','); + ((ChildrenRecognizer)next).toString (buf, table); + } else // bug! + buf.append (",+"); + return; + } + + // CHOICE + buf.append ("<"); + for (int i = 0; i < components.length; i++) { + if (i != 0) + buf.append ("|"); + if (components [i] instanceof EmptyRecognizer) { + buf.append ("{}"); + } else if (components [i] == null) { // patch-to-next + buf.append ('*'); + } else { + ChildrenRecognizer r; + + r = (ChildrenRecognizer) components [i]; + r.toString (buf, table); + } + } + buf.append (">"); + } /**/ } } diff --git a/libjava/classpath/gnu/xml/pipeline/WellFormednessFilter.java b/libjava/classpath/gnu/xml/pipeline/WellFormednessFilter.java index ef430165..7a3db65 100644 --- a/libjava/classpath/gnu/xml/pipeline/WellFormednessFilter.java +++ b/libjava/classpath/gnu/xml/pipeline/WellFormednessFilter.java @@ -1,4 +1,4 @@ -/* WellFormednessFilter.java -- +/* WellFormednessFilter.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,27 +50,27 @@ import org.xml.sax.SAXParseException; * This filter reports fatal exceptions in the case of event streams that * are not well formed. The rules currently tested include: <ul> * - * <li>setDocumentLocator ... may be called only before startDocument + * <li>setDocumentLocator ... may be called only before startDocument * - * <li>startDocument/endDocument ... must be paired, and all other - * calls (except setDocumentLocator) must be nested within these. + * <li>startDocument/endDocument ... must be paired, and all other + * calls (except setDocumentLocator) must be nested within these. * - * <li>startElement/endElement ... must be correctly paired, and - * may never appear within CDATA sections. + * <li>startElement/endElement ... must be correctly paired, and + * may never appear within CDATA sections. * - * <li>comment ... can't contain "--" + * <li>comment ... can't contain "--" * - * <li>character data ... can't contain "]]>" + * <li>character data ... can't contain "]]>" * - * <li>whitespace ... can't contain CR + * <li>whitespace ... can't contain CR * - * <li>whitespace and character data must be within an element + * <li>whitespace and character data must be within an element * - * <li>processing instruction ... can't contain "?>" or CR + * <li>processing instruction ... can't contain "?>" or CR * - * <li>startCDATA/endCDATA ... must be correctly paired. + * <li>startCDATA/endCDATA ... must be correctly paired. * - * </ul> + * </ul> * * <p> Other checks for event stream correctness may be provided in * the future. For example, insisting that @@ -84,35 +84,35 @@ import org.xml.sax.SAXParseException; */ public final class WellFormednessFilter extends EventFilter { - private boolean startedDoc; - private Stack elementStack = new Stack (); - private boolean startedCDATA; - private String dtdState = "before"; + private boolean startedDoc; + private Stack elementStack = new Stack (); + private boolean startedCDATA; + private String dtdState = "before"; + - /** * Swallows all events after performing well formedness checks. */ - // constructor used by PipelineFactory + // constructor used by PipelineFactory public WellFormednessFilter () - { this (null); } + { this (null); } /** * Passes events through to the specified consumer, after first * processing them. */ - // constructor used by PipelineFactory + // constructor used by PipelineFactory public WellFormednessFilter (EventConsumer consumer) { - super (consumer); - - setContentHandler (this); - setDTDHandler (this); - - try { - setProperty (LEXICAL_HANDLER, this); - } catch (SAXException e) { /* can't happen */ } + super (consumer); + + setContentHandler (this); + setDTDHandler (this); + + try { + setProperty (LEXICAL_HANDLER, this); + } catch (SAXException e) { /* can't happen */ } } /** @@ -122,123 +122,123 @@ public final class WellFormednessFilter extends EventFilter */ public void reset () { - startedDoc = false; - startedCDATA = false; - elementStack.removeAllElements (); + startedDoc = false; + startedCDATA = false; + elementStack.removeAllElements (); } private SAXParseException getException (String message) { - SAXParseException e; - Locator locator = getDocumentLocator (); + SAXParseException e; + Locator locator = getDocumentLocator (); - if (locator == null) - return new SAXParseException (message, null, null, -1, -1); - else - return new SAXParseException (message, locator); + if (locator == null) + return new SAXParseException (message, null, null, -1, -1); + else + return new SAXParseException (message, locator); } private void fatalError (String message) throws SAXException { - SAXParseException e = getException (message); - ErrorHandler handler = getErrorHandler (); + SAXParseException e = getException (message); + ErrorHandler handler = getErrorHandler (); - if (handler != null) - handler.fatalError (e); - throw e; + if (handler != null) + handler.fatalError (e); + throw e; } /** * Throws an exception when called after startDocument. * * @param locator the locator, to be used in error reporting or relative - * URI resolution. + * URI resolution. * * @exception IllegalStateException when called after the document - * has already been started + * has already been started */ public void setDocumentLocator (Locator locator) { - if (startedDoc) - throw new IllegalStateException ( - "setDocumentLocator called after startDocument"); - super.setDocumentLocator (locator); + if (startedDoc) + throw new IllegalStateException ( + "setDocumentLocator called after startDocument"); + super.setDocumentLocator (locator); } public void startDocument () throws SAXException { - if (startedDoc) - fatalError ("startDocument called more than once"); - startedDoc = true; - startedCDATA = false; - elementStack.removeAllElements (); - super.startDocument (); + if (startedDoc) + fatalError ("startDocument called more than once"); + startedDoc = true; + startedCDATA = false; + elementStack.removeAllElements (); + super.startDocument (); } public void startElement ( - String uri, String localName, - String qName, Attributes atts + String uri, String localName, + String qName, Attributes atts ) throws SAXException { - if (!startedDoc) - fatalError ("callback outside of document?"); - if ("inside".equals (dtdState)) - fatalError ("element inside DTD?"); - else - dtdState = "after"; - if (startedCDATA) - fatalError ("element inside CDATA section"); - if (qName == null || "".equals (qName)) - fatalError ("startElement name missing"); - elementStack.push (qName); - super.startElement (uri, localName, qName, atts); + if (!startedDoc) + fatalError ("callback outside of document?"); + if ("inside".equals (dtdState)) + fatalError ("element inside DTD?"); + else + dtdState = "after"; + if (startedCDATA) + fatalError ("element inside CDATA section"); + if (qName == null || "".equals (qName)) + fatalError ("startElement name missing"); + elementStack.push (qName); + super.startElement (uri, localName, qName, atts); } public void endElement (String uri, String localName, String qName) throws SAXException { - if (!startedDoc) - fatalError ("callback outside of document?"); - if (startedCDATA) - fatalError ("element inside CDATA section"); - if (qName == null || "".equals (qName)) - fatalError ("endElement name missing"); - - try { - String top = (String) elementStack.pop (); - - if (!qName.equals (top)) - fatalError ("<" + top + " ...>...</" + qName + ">"); - // XXX could record/test namespace info - } catch (EmptyStackException e) { - fatalError ("endElement without startElement: </" + qName + ">"); - } - super.endElement (uri, localName, qName); + if (!startedDoc) + fatalError ("callback outside of document?"); + if (startedCDATA) + fatalError ("element inside CDATA section"); + if (qName == null || "".equals (qName)) + fatalError ("endElement name missing"); + + try { + String top = (String) elementStack.pop (); + + if (!qName.equals (top)) + fatalError ("<" + top + " ...>...</" + qName + ">"); + // XXX could record/test namespace info + } catch (EmptyStackException e) { + fatalError ("endElement without startElement: </" + qName + ">"); + } + super.endElement (uri, localName, qName); } public void endDocument () throws SAXException { - if (!startedDoc) - fatalError ("callback outside of document?"); - dtdState = "before"; - startedDoc = false; - super.endDocument (); + if (!startedDoc) + fatalError ("callback outside of document?"); + dtdState = "before"; + startedDoc = false; + super.endDocument (); } public void startDTD (String root, String publicId, String systemId) throws SAXException { - if (!startedDoc) - fatalError ("callback outside of document?"); + if (!startedDoc) + fatalError ("callback outside of document?"); if ("before" != dtdState) - fatalError ("two DTDs?"); - if (!elementStack.empty ()) - fatalError ("DTD must precede root element"); - dtdState = "inside"; - super.startDTD (root, publicId, systemId); + fatalError ("two DTDs?"); + if (!elementStack.empty ()) + fatalError ("DTD must precede root element"); + dtdState = "inside"; + super.startDTD (root, publicId, systemId); } public void notationDecl (String name, String publicId, String systemId) @@ -247,19 +247,19 @@ public final class WellFormednessFilter extends EventFilter // FIXME: not all parsers will report startDTD() ... // we'd rather insist we're "inside". if ("after" == dtdState) - fatalError ("not inside DTD"); - super.notationDecl (name, publicId, systemId); + fatalError ("not inside DTD"); + super.notationDecl (name, publicId, systemId); } public void unparsedEntityDecl (String name, - String publicId, String systemId, String notationName) + String publicId, String systemId, String notationName) throws SAXException { // FIXME: not all parsers will report startDTD() ... // we'd rather insist we're "inside". if ("after" == dtdState) - fatalError ("not inside DTD"); - super.unparsedEntityDecl (name, publicId, systemId, notationName); + fatalError ("not inside DTD"); + super.unparsedEntityDecl (name, publicId, systemId, notationName); } // FIXME: add the four DeclHandler calls too @@ -267,97 +267,97 @@ public final class WellFormednessFilter extends EventFilter public void endDTD () throws SAXException { - if (!startedDoc) - fatalError ("callback outside of document?"); - if ("inside" != dtdState) - fatalError ("DTD ends without start?"); - dtdState = "after"; - super.endDTD (); + if (!startedDoc) + fatalError ("callback outside of document?"); + if ("inside" != dtdState) + fatalError ("DTD ends without start?"); + dtdState = "after"; + super.endDTD (); } public void characters (char ch [], int start, int length) throws SAXException { - int here = start, end = start + length; - if (elementStack.empty ()) - fatalError ("characters must be in an element"); - while (here < end) { - if (ch [here++] != ']') - continue; - if (here == end) // potential problem ... - continue; - if (ch [here++] != ']') - continue; - if (here == end) // potential problem ... - continue; - if (ch [here++] == '>') - fatalError ("character data can't contain \"]]>\""); - } - super.characters (ch, start, length); + int here = start, end = start + length; + if (elementStack.empty ()) + fatalError ("characters must be in an element"); + while (here < end) { + if (ch [here++] != ']') + continue; + if (here == end) // potential problem ... + continue; + if (ch [here++] != ']') + continue; + if (here == end) // potential problem ... + continue; + if (ch [here++] == '>') + fatalError ("character data can't contain \"]]>\""); + } + super.characters (ch, start, length); } public void ignorableWhitespace (char ch [], int start, int length) throws SAXException { - int here = start, end = start + length; - if (elementStack.empty ()) - fatalError ("characters must be in an element"); - while (here < end) { - if (ch [here++] == '\r') - fatalError ("whitespace can't contain CR"); - } - super.ignorableWhitespace (ch, start, length); + int here = start, end = start + length; + if (elementStack.empty ()) + fatalError ("characters must be in an element"); + while (here < end) { + if (ch [here++] == '\r') + fatalError ("whitespace can't contain CR"); + } + super.ignorableWhitespace (ch, start, length); } public void processingInstruction (String target, String data) throws SAXException { - if (data.indexOf ('\r') > 0) - fatalError ("PIs can't contain CR"); - if (data.indexOf ("?>") > 0) - fatalError ("PIs can't contain \"?>\""); + if (data.indexOf ('\r') > 0) + fatalError ("PIs can't contain CR"); + if (data.indexOf ("?>") > 0) + fatalError ("PIs can't contain \"?>\""); } public void comment (char ch [], int start, int length) throws SAXException { - if (!startedDoc) - fatalError ("callback outside of document?"); - if (startedCDATA) - fatalError ("comments can't nest in CDATA"); - int here = start, end = start + length; - while (here < end) { - if (ch [here] == '\r') - fatalError ("comments can't contain CR"); - if (ch [here++] != '-') - continue; - if (here == end) - fatalError ("comments can't end with \"--->\""); - if (ch [here++] == '-') - fatalError ("comments can't contain \"--\""); - } - super.comment (ch, start, length); + if (!startedDoc) + fatalError ("callback outside of document?"); + if (startedCDATA) + fatalError ("comments can't nest in CDATA"); + int here = start, end = start + length; + while (here < end) { + if (ch [here] == '\r') + fatalError ("comments can't contain CR"); + if (ch [here++] != '-') + continue; + if (here == end) + fatalError ("comments can't end with \"--->\""); + if (ch [here++] == '-') + fatalError ("comments can't contain \"--\""); + } + super.comment (ch, start, length); } public void startCDATA () throws SAXException { - if (!startedDoc) - fatalError ("callback outside of document?"); - if (startedCDATA) - fatalError ("CDATA starts can't nest"); - startedCDATA = true; - super.startCDATA (); + if (!startedDoc) + fatalError ("callback outside of document?"); + if (startedCDATA) + fatalError ("CDATA starts can't nest"); + startedCDATA = true; + super.startCDATA (); } public void endCDATA () throws SAXException { - if (!startedDoc) - fatalError ("callback outside of document?"); - if (!startedCDATA) - fatalError ("CDATA end without start?"); - startedCDATA = false; - super.endCDATA (); + if (!startedDoc) + fatalError ("callback outside of document?"); + if (!startedCDATA) + fatalError ("CDATA end without start?"); + startedCDATA = false; + super.endCDATA (); } } diff --git a/libjava/classpath/gnu/xml/pipeline/XIncludeFilter.java b/libjava/classpath/gnu/xml/pipeline/XIncludeFilter.java index 02607a4..a1445fa 100644 --- a/libjava/classpath/gnu/xml/pipeline/XIncludeFilter.java +++ b/libjava/classpath/gnu/xml/pipeline/XIncludeFilter.java @@ -1,4 +1,4 @@ -/* XIncludeFilter.java -- +/* XIncludeFilter.java -- Copyright (C) 2001,2002 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -40,8 +40,8 @@ package gnu.xml.pipeline; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.net.URL; -import java.net.URLConnection; +import java.net.URL; +import java.net.URLConnection; import java.util.Hashtable; import java.util.Stack; import java.util.Vector; @@ -77,7 +77,7 @@ import gnu.xml.util.Resolver; * currently supported. * * <li> DTDs are not supported in included files, since the SAX DTD events - * must have completely preceded any included file. + * must have completely preceded any included file. * The CR explicitly allows the DTD related portions of the infoset to * grow as an effect of including XML documents. * @@ -101,33 +101,33 @@ import gnu.xml.util.Resolver; */ public class XIncludeFilter extends EventFilter implements Locator { - private Hashtable extEntities = new Hashtable (5, 5); - private int ignoreCount; - private Stack uris = new Stack (); - private Locator locator; - private Vector inclusions = new Vector (5, 5); - private boolean savingPrefixes; + private Hashtable extEntities = new Hashtable (5, 5); + private int ignoreCount; + private Stack uris = new Stack (); + private Locator locator; + private Vector inclusions = new Vector (5, 5); + private boolean savingPrefixes; /** */ public XIncludeFilter (EventConsumer next) throws SAXException { - super (next); - setContentHandler (this); - // DTDHandler callbacks pass straight through - setProperty (DECL_HANDLER, this); - setProperty (LEXICAL_HANDLER, this); + super (next); + setContentHandler (this); + // DTDHandler callbacks pass straight through + setProperty (DECL_HANDLER, this); + setProperty (LEXICAL_HANDLER, this); } private void fatal (SAXParseException e) throws SAXException { - ErrorHandler eh; - - eh = getErrorHandler (); - if (eh != null) - eh.fatalError (e); - throw e; + ErrorHandler eh; + + eh = getErrorHandler (); + if (eh != null) + eh.fatalError (e); + throw e; } /** @@ -135,29 +135,29 @@ public class XIncludeFilter extends EventFilter implements Locator */ public void setDocumentLocator (Locator locator) { - this.locator = locator; - super.setDocumentLocator (this); + this.locator = locator; + super.setDocumentLocator (this); } /** Used for proxy locator; do not call directly. */ public String getSystemId () - { return (locator == null) ? null : locator.getSystemId (); } + { return (locator == null) ? null : locator.getSystemId (); } /** Used for proxy locator; do not call directly. */ public String getPublicId () - { return (locator == null) ? null : locator.getPublicId (); } + { return (locator == null) ? null : locator.getPublicId (); } /** Used for proxy locator; do not call directly. */ public int getLineNumber () - { return (locator == null) ? -1 : locator.getLineNumber (); } + { return (locator == null) ? -1 : locator.getLineNumber (); } /** Used for proxy locator; do not call directly. */ public int getColumnNumber () - { return (locator == null) ? -1 : locator.getColumnNumber (); } + { return (locator == null) ? -1 : locator.getColumnNumber (); } /** * Assigns the flag controlling the setting of the SAX2 * <em>namespace-prefixes</em> flag. */ public void setSavingPrefixes (boolean flag) - { savingPrefixes = flag; } + { savingPrefixes = flag; } /** * Returns the flag controlling the setting of the SAX2 @@ -166,49 +166,49 @@ public class XIncludeFilter extends EventFilter implements Locator * information that can be useful. */ public boolean isSavingPrefixes () - { return savingPrefixes; } + { return savingPrefixes; } // // Two mechanisms are interacting here. - // - // - XML Base implies a stack of base URIs, updated both by - // "real entity" boundaries and element boundaries. // - // - Active "Real Entities" (for document and general entities, - // and by xincluded files) are tracked to prevent circular - // inclusions. + // - XML Base implies a stack of base URIs, updated both by + // "real entity" boundaries and element boundaries. + // + // - Active "Real Entities" (for document and general entities, + // and by xincluded files) are tracked to prevent circular + // inclusions. // private String addMarker (String uri) throws SAXException { - if (locator != null && locator.getSystemId () != null) - uri = locator.getSystemId (); - - // guard against InputSource objects without system IDs - if (uri == null) - fatal (new SAXParseException ("Entity URI is unknown", locator)); - - try { - URL url = new URL (uri); - - uri = url.toString (); - if (inclusions.contains (uri)) - fatal (new SAXParseException ( - "XInclude, circular inclusion", locator)); - inclusions.addElement (uri); - uris.push (url); - } catch (IOException e) { - // guard against illegal relative URIs (Xerces) - fatal (new SAXParseException ("parser bug: relative URI", - locator, e)); - } - return uri; + if (locator != null && locator.getSystemId () != null) + uri = locator.getSystemId (); + + // guard against InputSource objects without system IDs + if (uri == null) + fatal (new SAXParseException ("Entity URI is unknown", locator)); + + try { + URL url = new URL (uri); + + uri = url.toString (); + if (inclusions.contains (uri)) + fatal (new SAXParseException ( + "XInclude, circular inclusion", locator)); + inclusions.addElement (uri); + uris.push (url); + } catch (IOException e) { + // guard against illegal relative URIs (Xerces) + fatal (new SAXParseException ("parser bug: relative URI", + locator, e)); + } + return uri; } private void pop (String uri) { - inclusions.removeElement (uri); - uris.pop (); + inclusions.removeElement (uri); + uris.pop (); } // @@ -216,66 +216,66 @@ public class XIncludeFilter extends EventFilter implements Locator // public void startDocument () throws SAXException { - ignoreCount = 0; - addMarker (null); - super.startDocument (); + ignoreCount = 0; + addMarker (null); + super.startDocument (); } public void endDocument () throws SAXException { - inclusions.setSize (0); - extEntities.clear (); - uris.setSize (0); - super.endDocument (); + inclusions.setSize (0); + extEntities.clear (); + uris.setSize (0); + super.endDocument (); } // // External general entity boundaries get both treatments. // public void externalEntityDecl (String name, - String publicId, String systemId) + String publicId, String systemId) throws SAXException { - if (name.charAt (0) == '%') - return; - try { - URL url = new URL (locator.getSystemId ()); - systemId = new URL (url, systemId).toString (); - } catch (IOException e) { - // what could we do? - } - extEntities.put (name, systemId); + if (name.charAt (0) == '%') + return; + try { + URL url = new URL (locator.getSystemId ()); + systemId = new URL (url, systemId).toString (); + } catch (IOException e) { + // what could we do? + } + extEntities.put (name, systemId); } public void startEntity (String name) throws SAXException { - if (ignoreCount != 0) { - ignoreCount++; - return; - } - - String uri = (String) extEntities.get (name); - if (uri != null) - addMarker (uri); - super.startEntity (name); + if (ignoreCount != 0) { + ignoreCount++; + return; + } + + String uri = (String) extEntities.get (name); + if (uri != null) + addMarker (uri); + super.startEntity (name); } public void endEntity (String name) throws SAXException { - if (ignoreCount != 0) { - if (--ignoreCount != 0) - return; - } + if (ignoreCount != 0) { + if (--ignoreCount != 0) + return; + } - String uri = (String) extEntities.get (name); + String uri = (String) extEntities.get (name); - if (uri != null) - pop (uri); - super.endEntity (name); + if (uri != null) + pop (uri); + super.endEntity (name); } - + // // element boundaries only affect the base URI stack, // unless they're XInclude elements. @@ -284,103 +284,103 @@ public class XIncludeFilter extends EventFilter implements Locator startElement (String uri, String localName, String qName, Attributes atts) throws SAXException { - if (ignoreCount != 0) { - ignoreCount++; - return; - } - - URL baseURI = (URL) uris.peek (); - String base; - - base = atts.getValue ("http://www.w3.org/XML/1998/namespace", "base"); - if (base == null) - uris.push (baseURI); - else { - URL url; - - if (base.indexOf ('#') != -1) - fatal (new SAXParseException ( - "xml:base with fragment: " + base, - locator)); - - try { - baseURI = new URL (baseURI, base); - uris.push (baseURI); - } catch (Exception e) { - fatal (new SAXParseException ( - "xml:base with illegal uri: " + base, - locator, e)); - } - } - - if (!"http://www.w3.org/2001/XInclude".equals (uri)) { - super.startElement (uri, localName, qName, atts); - return; - } - - if ("include".equals (localName)) { - String href = atts.getValue ("href"); - String parse = atts.getValue ("parse"); - String encoding = atts.getValue ("encoding"); - URL url = (URL) uris.peek (); - SAXParseException x = null; - - if (href == null) - fatal (new SAXParseException ( - "XInclude missing href", - locator)); - if (href.indexOf ('#') != -1) - fatal (new SAXParseException ( - "XInclude with fragment: " + href, - locator)); - - if (parse == null || "xml".equals (parse)) - x = xinclude (url, href); - else if ("text".equals (parse)) - x = readText (url, href, encoding); - else - fatal (new SAXParseException ( - "unknown XInclude parsing mode: " + parse, - locator)); - if (x == null) { - // strip out all child content - ignoreCount++; - return; - } - - // FIXME the 17-Sept-2002 CR of XInclude says we "must" - // use xi:fallback elements to handle resource errors, - // if they exist. - fatal (x); - - } else if ("fallback".equals (localName)) { - fatal (new SAXParseException ( - "illegal top level XInclude 'fallback' element", - locator)); - } else { - ErrorHandler eh = getErrorHandler (); - - // CR doesn't say this is an error - if (eh != null) - eh.warning (new SAXParseException ( - "unrecognized toplevel XInclude element: " + localName, - locator)); - super.startElement (uri, localName, qName, atts); - } + if (ignoreCount != 0) { + ignoreCount++; + return; + } + + URL baseURI = (URL) uris.peek (); + String base; + + base = atts.getValue ("http://www.w3.org/XML/1998/namespace", "base"); + if (base == null) + uris.push (baseURI); + else { + URL url; + + if (base.indexOf ('#') != -1) + fatal (new SAXParseException ( + "xml:base with fragment: " + base, + locator)); + + try { + baseURI = new URL (baseURI, base); + uris.push (baseURI); + } catch (Exception e) { + fatal (new SAXParseException ( + "xml:base with illegal uri: " + base, + locator, e)); + } + } + + if (!"http://www.w3.org/2001/XInclude".equals (uri)) { + super.startElement (uri, localName, qName, atts); + return; + } + + if ("include".equals (localName)) { + String href = atts.getValue ("href"); + String parse = atts.getValue ("parse"); + String encoding = atts.getValue ("encoding"); + URL url = (URL) uris.peek (); + SAXParseException x = null; + + if (href == null) + fatal (new SAXParseException ( + "XInclude missing href", + locator)); + if (href.indexOf ('#') != -1) + fatal (new SAXParseException ( + "XInclude with fragment: " + href, + locator)); + + if (parse == null || "xml".equals (parse)) + x = xinclude (url, href); + else if ("text".equals (parse)) + x = readText (url, href, encoding); + else + fatal (new SAXParseException ( + "unknown XInclude parsing mode: " + parse, + locator)); + if (x == null) { + // strip out all child content + ignoreCount++; + return; + } + + // FIXME the 17-Sept-2002 CR of XInclude says we "must" + // use xi:fallback elements to handle resource errors, + // if they exist. + fatal (x); + + } else if ("fallback".equals (localName)) { + fatal (new SAXParseException ( + "illegal top level XInclude 'fallback' element", + locator)); + } else { + ErrorHandler eh = getErrorHandler (); + + // CR doesn't say this is an error + if (eh != null) + eh.warning (new SAXParseException ( + "unrecognized toplevel XInclude element: " + localName, + locator)); + super.startElement (uri, localName, qName, atts); + } } public void endElement (String uri, String localName, String qName) throws SAXException { - if (ignoreCount != 0) { - if (--ignoreCount != 0) - return; - } - - uris.pop (); - if (!("http://www.w3.org/2001/XInclude".equals (uri) - && "include".equals (localName))) - super.endElement (uri, localName, qName); + if (ignoreCount != 0) { + if (--ignoreCount != 0) + return; + } + + uris.pop (); + if (!("http://www.w3.org/2001/XInclude".equals (uri) + && "include".equals (localName))) + super.endElement (uri, localName, qName); } // @@ -389,66 +389,66 @@ public class XIncludeFilter extends EventFilter implements Locator public void characters (char ch [], int start, int length) throws SAXException { - if (ignoreCount == 0) - super.characters (ch, start, length); + if (ignoreCount == 0) + super.characters (ch, start, length); } public void processingInstruction (String target, String value) throws SAXException { - if (ignoreCount == 0) - super.processingInstruction (target, value); + if (ignoreCount == 0) + super.processingInstruction (target, value); } public void ignorableWhitespace (char ch [], int start, int length) throws SAXException { - if (ignoreCount == 0) - super.ignorableWhitespace (ch, start, length); + if (ignoreCount == 0) + super.ignorableWhitespace (ch, start, length); } public void comment (char ch [], int start, int length) throws SAXException { - if (ignoreCount == 0) - super.comment (ch, start, length); + if (ignoreCount == 0) + super.comment (ch, start, length); } public void startCDATA () throws SAXException { - if (ignoreCount == 0) - super.startCDATA (); + if (ignoreCount == 0) + super.startCDATA (); } public void endCDATA () throws SAXException { - if (ignoreCount == 0) - super.endCDATA (); + if (ignoreCount == 0) + super.endCDATA (); } public void startPrefixMapping (String prefix, String uri) throws SAXException { - if (ignoreCount == 0) - super.startPrefixMapping (prefix, uri); + if (ignoreCount == 0) + super.startPrefixMapping (prefix, uri); } public void endPrefixMapping (String prefix) throws SAXException { - if (ignoreCount == 0) - super.endPrefixMapping (prefix); + if (ignoreCount == 0) + super.endPrefixMapping (prefix); } public void skippedEntity (String name) throws SAXException { - if (ignoreCount == 0) - super.skippedEntity (name); + if (ignoreCount == 0) + super.skippedEntity (name); } // JDK 1.1 seems to need it to be done this way, sigh void setLocator (Locator l) { locator = l; } Locator getLocator () { return locator; } - + // // for XIncluded entities, manage the current locator and @@ -456,45 +456,45 @@ public class XIncludeFilter extends EventFilter implements Locator // private class Scrubber extends EventFilter { - Scrubber (EventFilter f) - throws SAXException - { - // delegation passes to next in chain - super (f); - - // process all content events - super.setContentHandler (this); - super.setProperty (LEXICAL_HANDLER, this); - - // drop all DTD events - super.setDTDHandler (null); - super.setProperty (DECL_HANDLER, null); - } - - // maintain proxy locator - // only one startDocument()/endDocument() pair per event stream - public void setDocumentLocator (Locator l) - { setLocator (l); } - public void startDocument () - { } - public void endDocument () - { } - - private void reject (String message) throws SAXException - { fatal (new SAXParseException (message, getLocator ())); } - - // only the DTD from the "base document" gets reported - public void startDTD (String root, String publicId, String systemId) - throws SAXException - { reject ("XIncluded DTD: " + systemId); } - public void endDTD () - throws SAXException - { reject ("XIncluded DTD"); } - // ... so this should never happen - public void skippedEntity (String name) throws SAXException - { reject ("XInclude skipped entity: " + name); } - - // since we rejected DTDs, only builtin entities can be reported + Scrubber (EventFilter f) + throws SAXException + { + // delegation passes to next in chain + super (f); + + // process all content events + super.setContentHandler (this); + super.setProperty (LEXICAL_HANDLER, this); + + // drop all DTD events + super.setDTDHandler (null); + super.setProperty (DECL_HANDLER, null); + } + + // maintain proxy locator + // only one startDocument()/endDocument() pair per event stream + public void setDocumentLocator (Locator l) + { setLocator (l); } + public void startDocument () + { } + public void endDocument () + { } + + private void reject (String message) throws SAXException + { fatal (new SAXParseException (message, getLocator ())); } + + // only the DTD from the "base document" gets reported + public void startDTD (String root, String publicId, String systemId) + throws SAXException + { reject ("XIncluded DTD: " + systemId); } + public void endDTD () + throws SAXException + { reject ("XIncluded DTD"); } + // ... so this should never happen + public void skippedEntity (String name) throws SAXException + { reject ("XInclude skipped entity: " + name); } + + // since we rejected DTDs, only builtin entities can be reported } // <xi:include parse='xml' ...> @@ -502,40 +502,40 @@ public class XIncludeFilter extends EventFilter implements Locator private SAXParseException xinclude (URL url, String href) throws SAXException { - XMLReader helper; - Scrubber scrubber; - Locator savedLocator = locator; - - // start with a parser acting just like our input - // modulo DTD-ish stuff (validation flag, entity resolver) - helper = XMLReaderFactory.createXMLReader (); - helper.setErrorHandler (getErrorHandler ()); - helper.setFeature (FEATURE_URI + "namespace-prefixes", true); - - // Set up the proxy locator and event filter. - scrubber = new Scrubber (this); - locator = null; - bind (helper, scrubber); - - // Merge the included document, except its DTD - try { - url = new URL (url, href); - href = url.toString (); - - if (inclusions.contains (href)) - fatal (new SAXParseException ( - "XInclude, circular inclusion", locator)); - - inclusions.addElement (href); - uris.push (url); - helper.parse (new InputSource (href)); - return null; - } catch (java.io.IOException e) { - return new SAXParseException (href, locator, e); - } finally { - pop (href); - locator = savedLocator; - } + XMLReader helper; + Scrubber scrubber; + Locator savedLocator = locator; + + // start with a parser acting just like our input + // modulo DTD-ish stuff (validation flag, entity resolver) + helper = XMLReaderFactory.createXMLReader (); + helper.setErrorHandler (getErrorHandler ()); + helper.setFeature (FEATURE_URI + "namespace-prefixes", true); + + // Set up the proxy locator and event filter. + scrubber = new Scrubber (this); + locator = null; + bind (helper, scrubber); + + // Merge the included document, except its DTD + try { + url = new URL (url, href); + href = url.toString (); + + if (inclusions.contains (href)) + fatal (new SAXParseException ( + "XInclude, circular inclusion", locator)); + + inclusions.addElement (href); + uris.push (url); + helper.parse (new InputSource (href)); + return null; + } catch (java.io.IOException e) { + return new SAXParseException (href, locator, e); + } finally { + pop (href); + locator = savedLocator; + } } // <xi:include parse='text' ...> @@ -543,37 +543,37 @@ public class XIncludeFilter extends EventFilter implements Locator private SAXParseException readText (URL url, String href, String encoding) throws SAXException { - InputStream in = null; - - try { - URLConnection conn; - InputStreamReader reader; - char buf [] = new char [4096]; - int count; - - url = new URL (url, href); - conn = url.openConnection (); - in = conn.getInputStream (); - if (encoding == null) - encoding = Resolver.getEncoding (conn.getContentType ()); - if (encoding == null) { - ErrorHandler eh = getErrorHandler (); - if (eh != null) - eh.warning (new SAXParseException ( - "guessing text encoding for URL: " + url, - locator)); - reader = new InputStreamReader (in); - } else - reader = new InputStreamReader (in, encoding); - - while ((count = reader.read (buf, 0, buf.length)) != -1) - super.characters (buf, 0, count); - in.close (); - return null; - } catch (IOException e) { - return new SAXParseException ( - "can't XInclude text", - locator, e); - } + InputStream in = null; + + try { + URLConnection conn; + InputStreamReader reader; + char buf [] = new char [4096]; + int count; + + url = new URL (url, href); + conn = url.openConnection (); + in = conn.getInputStream (); + if (encoding == null) + encoding = Resolver.getEncoding (conn.getContentType ()); + if (encoding == null) { + ErrorHandler eh = getErrorHandler (); + if (eh != null) + eh.warning (new SAXParseException ( + "guessing text encoding for URL: " + url, + locator)); + reader = new InputStreamReader (in); + } else + reader = new InputStreamReader (in, encoding); + + while ((count = reader.read (buf, 0, buf.length)) != -1) + super.characters (buf, 0, count); + in.close (); + return null; + } catch (IOException e) { + return new SAXParseException ( + "can't XInclude text", + locator, e); + } } } diff --git a/libjava/classpath/gnu/xml/pipeline/XsltFilter.java b/libjava/classpath/gnu/xml/pipeline/XsltFilter.java index 0a1872c..86b6190 100644 --- a/libjava/classpath/gnu/xml/pipeline/XsltFilter.java +++ b/libjava/classpath/gnu/xml/pipeline/XsltFilter.java @@ -1,4 +1,4 @@ -/* XsltFilter.java -- +/* XsltFilter.java -- Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,8 +49,8 @@ import org.xml.sax.ext.LexicalHandler; /** - * Packages an XSLT transform as a pipeline component. - * Note that all DTD events (callbacks to DeclHandler and DTDHandler + * Packages an XSLT transform as a pipeline component. + * Note that all DTD events (callbacks to DeclHandler and DTDHandler * interfaces) are discarded, although XSLT transforms may be set up to * use the LexicalHandler to write DTDs with only an external subset. * Not every XSLT engine will necessarily be usable with this filter, @@ -72,59 +72,59 @@ final public class XsltFilter extends EventFilter * or ErrorHandler support. * * @param stylesheet URI for the stylesheet specifying the - * XSLT transform + * XSLT transform * @param next provides the ContentHandler and LexicalHandler - * to receive XSLT output. + * to receive XSLT output. * @exception SAXException if the stylesheet can't be parsed * @exception IOException if there are difficulties - * bootstrapping the XSLT engine, such as it not supporting - * SAX well enough to use this way. + * bootstrapping the XSLT engine, such as it not supporting + * SAX well enough to use this way. */ public XsltFilter (String stylesheet, EventConsumer next) throws SAXException, IOException { - // First, get a transformer with the stylesheet preloaded - TransformerFactory tf = null; - TransformerHandler th; - - try { - SAXTransformerFactory stf; - - tf = TransformerFactory.newInstance (); - if (!tf.getFeature (SAXTransformerFactory.FEATURE) // sax inputs - || !tf.getFeature (SAXResult.FEATURE) // sax outputs - || !tf.getFeature (StreamSource.FEATURE) // stylesheet - ) - throw new IOException ("XSLT factory (" - + tf.getClass ().getName () - + ") does not support SAX"); - stf = (SAXTransformerFactory) tf; - th = stf.newTransformerHandler (new StreamSource (stylesheet)); - } catch (TransformerConfigurationException e) { - throw new IOException ("XSLT factory (" - + (tf == null - ? "none available" - : tf.getClass ().getName ()) - + ") configuration error, " - + e.getMessage () - ); - } - - // Hook its outputs up to the pipeline ... - SAXResult out = new SAXResult (); - - out.setHandler (next.getContentHandler ()); - try { - LexicalHandler lh; - lh = (LexicalHandler) next.getProperty (LEXICAL_HANDLER); - out.setLexicalHandler (lh); - } catch (Exception e) { - // ignore - } - th.setResult (out); - - // ... and make sure its inputs look like ours. - setContentHandler (th); - setProperty (LEXICAL_HANDLER, th); + // First, get a transformer with the stylesheet preloaded + TransformerFactory tf = null; + TransformerHandler th; + + try { + SAXTransformerFactory stf; + + tf = TransformerFactory.newInstance (); + if (!tf.getFeature (SAXTransformerFactory.FEATURE) // sax inputs + || !tf.getFeature (SAXResult.FEATURE) // sax outputs + || !tf.getFeature (StreamSource.FEATURE) // stylesheet + ) + throw new IOException ("XSLT factory (" + + tf.getClass ().getName () + + ") does not support SAX"); + stf = (SAXTransformerFactory) tf; + th = stf.newTransformerHandler (new StreamSource (stylesheet)); + } catch (TransformerConfigurationException e) { + throw new IOException ("XSLT factory (" + + (tf == null + ? "none available" + : tf.getClass ().getName ()) + + ") configuration error, " + + e.getMessage () + ); + } + + // Hook its outputs up to the pipeline ... + SAXResult out = new SAXResult (); + + out.setHandler (next.getContentHandler ()); + try { + LexicalHandler lh; + lh = (LexicalHandler) next.getProperty (LEXICAL_HANDLER); + out.setLexicalHandler (lh); + } catch (Exception e) { + // ignore + } + th.setResult (out); + + // ... and make sure its inputs look like ours. + setContentHandler (th); + setProperty (LEXICAL_HANDLER, th); } } diff --git a/libjava/classpath/gnu/xml/stream/AttributeImpl.java b/libjava/classpath/gnu/xml/stream/AttributeImpl.java index f74aebd..58a0dbe 100644 --- a/libjava/classpath/gnu/xml/stream/AttributeImpl.java +++ b/libjava/classpath/gnu/xml/stream/AttributeImpl.java @@ -1,4 +1,4 @@ -/* AttributeImpl.java -- +/* AttributeImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,7 +94,7 @@ public class AttributeImpl { return specified; } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { @@ -119,6 +119,5 @@ public class AttributeImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/BufferedReader.java b/libjava/classpath/gnu/xml/stream/BufferedReader.java index f8287e8..dc69fb3 100644 --- a/libjava/classpath/gnu/xml/stream/BufferedReader.java +++ b/libjava/classpath/gnu/xml/stream/BufferedReader.java @@ -1,4 +1,4 @@ -/* BufferedReader.java -- +/* BufferedReader.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -59,7 +59,7 @@ class BufferedReader { this(in, DEFAULT_BUFFER_SIZE); } - + BufferedReader(Reader in, int bufferSize) { if (bufferSize < 1) @@ -110,19 +110,19 @@ class BufferedReader { if (off < 0 || len < 0 || b.length - off < len) throw new IndexOutOfBoundsException(); - + if (len == 0) return 0; - + if (pos >= count && !refill()) return -1; - + int ret = Math.min(count - pos, len); System.arraycopy(buf, pos, b, off, ret); pos += ret; off += ret; len -= ret; - + while (len > 0 && refill()) { int remain = Math.min(count - pos, len); @@ -132,7 +132,7 @@ class BufferedReader len -= remain; ret += remain; } - + return ret; } @@ -177,7 +177,7 @@ class BufferedReader { char[] newbuf = buf; if (markpos < bufferSize) - { + { newbuf = new char[count - markpos + bufferSize]; } System.arraycopy(buf, markpos, newbuf, 0, markcount); diff --git a/libjava/classpath/gnu/xml/stream/CRLFReader.java b/libjava/classpath/gnu/xml/stream/CRLFReader.java index dad02b9..7f3cf4d 100644 --- a/libjava/classpath/gnu/xml/stream/CRLFReader.java +++ b/libjava/classpath/gnu/xml/stream/CRLFReader.java @@ -1,4 +1,4 @@ -/* CRLFReader.java -- +/* CRLFReader.java -- Copyright (C) 2005,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -115,7 +115,7 @@ class CRLFReader } else l = in.read(b, off, len); // CR(s) but no LF - } + } } return l; } @@ -178,4 +178,3 @@ class CRLFReader } } - diff --git a/libjava/classpath/gnu/xml/stream/CharactersImpl.java b/libjava/classpath/gnu/xml/stream/CharactersImpl.java index 6df0658..2107a5a 100644 --- a/libjava/classpath/gnu/xml/stream/CharactersImpl.java +++ b/libjava/classpath/gnu/xml/stream/CharactersImpl.java @@ -1,4 +1,4 @@ -/* CharactersImpl.java -- +/* CharactersImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -88,12 +88,12 @@ public class CharactersImpl { return cdata; } - + public boolean isIgnorableWhiteSpace() { return ignorableWhitespace; } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { @@ -105,7 +105,7 @@ public class CharactersImpl writer.write(data); writer.write("]]>"); } - else + else writer.write(encode(data, false)); } catch (IOException e) @@ -115,6 +115,5 @@ public class CharactersImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/CommentImpl.java b/libjava/classpath/gnu/xml/stream/CommentImpl.java index 5863fb0..118ac7a 100644 --- a/libjava/classpath/gnu/xml/stream/CommentImpl.java +++ b/libjava/classpath/gnu/xml/stream/CommentImpl.java @@ -1,4 +1,4 @@ -/* CommentImpl.java -- +/* CommentImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,7 +70,7 @@ public class CommentImpl { return text; } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { @@ -87,6 +87,5 @@ public class CommentImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/DTDImpl.java b/libjava/classpath/gnu/xml/stream/DTDImpl.java index 8e008aa..cf049d3 100644 --- a/libjava/classpath/gnu/xml/stream/DTDImpl.java +++ b/libjava/classpath/gnu/xml/stream/DTDImpl.java @@ -1,4 +1,4 @@ -/* DTDImpl.java -- +/* DTDImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -93,7 +93,7 @@ public class DTDImpl { return entities; } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { @@ -110,6 +110,5 @@ public class DTDImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/EndDocumentImpl.java b/libjava/classpath/gnu/xml/stream/EndDocumentImpl.java index 0e3ed96..13877c5 100644 --- a/libjava/classpath/gnu/xml/stream/EndDocumentImpl.java +++ b/libjava/classpath/gnu/xml/stream/EndDocumentImpl.java @@ -1,4 +1,4 @@ -/* EndDocumentImpl.java -- +/* EndDocumentImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -61,11 +61,10 @@ public class EndDocumentImpl { return END_DOCUMENT; } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/EndElementImpl.java b/libjava/classpath/gnu/xml/stream/EndElementImpl.java index 7b5382e..71f6aa0 100644 --- a/libjava/classpath/gnu/xml/stream/EndElementImpl.java +++ b/libjava/classpath/gnu/xml/stream/EndElementImpl.java @@ -1,4 +1,4 @@ -/* EndElementImpl.java -- +/* EndElementImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -80,7 +80,7 @@ public class EndElementImpl { return namespaces.iterator(); } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { @@ -103,6 +103,5 @@ public class EndElementImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/EntityDeclarationImpl.java b/libjava/classpath/gnu/xml/stream/EntityDeclarationImpl.java index 41ec2fb..b6e33e8 100644 --- a/libjava/classpath/gnu/xml/stream/EntityDeclarationImpl.java +++ b/libjava/classpath/gnu/xml/stream/EntityDeclarationImpl.java @@ -1,4 +1,4 @@ -/* EntityDeclarationImpl.java -- +/* EntityDeclarationImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -159,6 +159,5 @@ public class EntityDeclarationImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/EntityReferenceImpl.java b/libjava/classpath/gnu/xml/stream/EntityReferenceImpl.java index 38e1f00..6f8a11c 100644 --- a/libjava/classpath/gnu/xml/stream/EntityReferenceImpl.java +++ b/libjava/classpath/gnu/xml/stream/EntityReferenceImpl.java @@ -1,4 +1,4 @@ -/* EntityReferenceImpl.java -- +/* EntityReferenceImpl.java -- Copyright (C) 2005,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -99,4 +99,3 @@ public class EntityReferenceImpl } } - diff --git a/libjava/classpath/gnu/xml/stream/FilteredEventReader.java b/libjava/classpath/gnu/xml/stream/FilteredEventReader.java index fd6fe8b..1ddb469 100644 --- a/libjava/classpath/gnu/xml/stream/FilteredEventReader.java +++ b/libjava/classpath/gnu/xml/stream/FilteredEventReader.java @@ -1,4 +1,4 @@ -/* FilteredEventReader.java -- +/* FilteredEventReader.java -- Copyright (C) 2005,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -72,7 +72,7 @@ class FilteredEventReader while (!filter.accept(ret)); return ret; } - + public Object next() { try @@ -86,7 +86,7 @@ class FilteredEventReader throw e2; } } - + public XMLEvent peek() throws XMLStreamException { @@ -98,7 +98,7 @@ class FilteredEventReader while (!filter.accept(ret)); return ret; } - + public XMLEvent nextTag() throws XMLStreamException { @@ -110,6 +110,5 @@ class FilteredEventReader while (!filter.accept(ret)); return ret; } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/FilteredStreamReader.java b/libjava/classpath/gnu/xml/stream/FilteredStreamReader.java index 90ebb33..62d9648 100644 --- a/libjava/classpath/gnu/xml/stream/FilteredStreamReader.java +++ b/libjava/classpath/gnu/xml/stream/FilteredStreamReader.java @@ -1,4 +1,4 @@ -/* FilteredStreamReader.java -- +/* FilteredStreamReader.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -74,7 +74,7 @@ class FilteredStreamReader while (!filter.accept(reader)); return ret; } - + public int nextTag() throws XMLStreamException { @@ -86,6 +86,5 @@ class FilteredStreamReader while (!filter.accept(reader)); return ret; } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/NamespaceImpl.java b/libjava/classpath/gnu/xml/stream/NamespaceImpl.java index 1a595ee..241f980 100644 --- a/libjava/classpath/gnu/xml/stream/NamespaceImpl.java +++ b/libjava/classpath/gnu/xml/stream/NamespaceImpl.java @@ -1,4 +1,4 @@ -/* NamespaceImpl.java -- +/* NamespaceImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -109,7 +109,7 @@ public class NamespaceImpl { return (prefix == null || "".equals(prefix)); } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { @@ -133,6 +133,5 @@ public class NamespaceImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/NotationDeclarationImpl.java b/libjava/classpath/gnu/xml/stream/NotationDeclarationImpl.java index 2d08599..a338237 100644 --- a/libjava/classpath/gnu/xml/stream/NotationDeclarationImpl.java +++ b/libjava/classpath/gnu/xml/stream/NotationDeclarationImpl.java @@ -1,4 +1,4 @@ -/* NotationDeclarationImpl.java -- +/* NotationDeclarationImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -86,7 +86,7 @@ public class NotationDeclarationImpl { return systemId; } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { @@ -121,6 +121,5 @@ public class NotationDeclarationImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/ProcessingInstructionImpl.java b/libjava/classpath/gnu/xml/stream/ProcessingInstructionImpl.java index 6a50289..4ce0bad 100644 --- a/libjava/classpath/gnu/xml/stream/ProcessingInstructionImpl.java +++ b/libjava/classpath/gnu/xml/stream/ProcessingInstructionImpl.java @@ -1,4 +1,4 @@ -/* ProcessingInstructionImpl.java -- +/* ProcessingInstructionImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -78,7 +78,7 @@ public class ProcessingInstructionImpl { return data; } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { @@ -100,6 +100,5 @@ public class ProcessingInstructionImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/SAXParser.java b/libjava/classpath/gnu/xml/stream/SAXParser.java index ab1f86e..b71d98e 100644 --- a/libjava/classpath/gnu/xml/stream/SAXParser.java +++ b/libjava/classpath/gnu/xml/stream/SAXParser.java @@ -1,4 +1,4 @@ -/* SAXParser.java -- +/* SAXParser.java -- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -131,13 +131,13 @@ public class SAXParser } // -- SAXParser -- - + public Parser getParser() throws SAXException { return null; } - + public XMLReader getXMLReader() throws SAXException { @@ -365,11 +365,11 @@ public class SAXParser } reader = parser; baseURI = systemId; - + if (xIncludeAware) reader = new XIncludeFilter(parser, systemId, namespaceAware, validating, true); - + if (contentHandler != null) contentHandler.setDocumentLocator(this); boolean startDocumentDone = false; @@ -864,7 +864,7 @@ public class SAXParser } // -- Locator2 -- - + public int getColumnNumber() { Location l = reader.getLocation(); @@ -888,7 +888,7 @@ public class SAXParser Location l = reader.getLocation(); return l.getSystemId(); } - + public String getEncoding() { return encoding; @@ -900,7 +900,7 @@ public class SAXParser } // -- XMLResolver -- - + public Object resolveEntity(String publicId, String systemId, String baseURI, String namespace) throws XMLStreamException @@ -1037,5 +1037,5 @@ public class SAXParser pos++; } } - + } diff --git a/libjava/classpath/gnu/xml/stream/SAXParserFactory.java b/libjava/classpath/gnu/xml/stream/SAXParserFactory.java index a2ccea1..ebaeb3c 100644 --- a/libjava/classpath/gnu/xml/stream/SAXParserFactory.java +++ b/libjava/classpath/gnu/xml/stream/SAXParserFactory.java @@ -1,4 +1,4 @@ -/* SAXParserFactory.java -- +/* SAXParserFactory.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -92,13 +92,13 @@ public class SAXParserFactory features.put(name, value ? Boolean.TRUE : Boolean.FALSE); } - public boolean getFeature(String name) - throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException + public boolean getFeature(String name) + throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException { if (!FEATURE_NAMES.contains(name)) throw new SAXNotSupportedException(name); Boolean value = (Boolean) features.get(name); return (value == null) ? false : value.booleanValue(); } - + } diff --git a/libjava/classpath/gnu/xml/stream/StartDocumentImpl.java b/libjava/classpath/gnu/xml/stream/StartDocumentImpl.java index dc4251d..d2e590c 100644 --- a/libjava/classpath/gnu/xml/stream/StartDocumentImpl.java +++ b/libjava/classpath/gnu/xml/stream/StartDocumentImpl.java @@ -1,4 +1,4 @@ -/* StartDocumentImpl.java -- +/* StartDocumentImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -109,7 +109,7 @@ public class StartDocumentImpl { return xmlVersion; } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { @@ -139,6 +139,5 @@ public class StartDocumentImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/StartElementImpl.java b/libjava/classpath/gnu/xml/stream/StartElementImpl.java index 48f8865..66e68d5 100644 --- a/libjava/classpath/gnu/xml/stream/StartElementImpl.java +++ b/libjava/classpath/gnu/xml/stream/StartElementImpl.java @@ -1,4 +1,4 @@ -/* StartElementImpl.java -- +/* StartElementImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -115,7 +115,7 @@ public class StartElementImpl { return namespaceContext.getNamespaceURI(prefix); } - + public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException { @@ -148,6 +148,5 @@ public class StartElementImpl throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/UnicodeReader.java b/libjava/classpath/gnu/xml/stream/UnicodeReader.java index 9350cb2..aa2a954 100644 --- a/libjava/classpath/gnu/xml/stream/UnicodeReader.java +++ b/libjava/classpath/gnu/xml/stream/UnicodeReader.java @@ -1,4 +1,4 @@ -/* UnicodeReader.java -- +/* UnicodeReader.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -201,5 +201,5 @@ public class UnicodeReader } return buf; } - + } diff --git a/libjava/classpath/gnu/xml/stream/XIncludeFilter.java b/libjava/classpath/gnu/xml/stream/XIncludeFilter.java index aed9d9a..6d955c4 100644 --- a/libjava/classpath/gnu/xml/stream/XIncludeFilter.java +++ b/libjava/classpath/gnu/xml/stream/XIncludeFilter.java @@ -1,4 +1,4 @@ -/* XIncludeFilter.java -- +/* XIncludeFilter.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -107,7 +107,7 @@ class XIncludeFilter HashSet seen = new HashSet(); boolean backtracking; boolean lookahead; - + Reader includedText; char[] buf; int len = -1; @@ -677,7 +677,7 @@ class XIncludeFilter String base = (String) getParent().getProperty("gnu.xml.stream.baseURI"); return (base == null) ? systemId : base; } - + boolean includeResource(String href, String parse, String xpointer, String encoding, String accept, String acceptLanguage) @@ -700,7 +700,7 @@ class XIncludeFilter walker = null; current = null; backtracking = false; - + URLConnection connection = getURLConnection(href, accept, acceptLanguage); InputStream in = connection.getInputStream(); @@ -927,5 +927,5 @@ class XIncludeFilter } return null; } - + } diff --git a/libjava/classpath/gnu/xml/stream/XMLEventAllocatorImpl.java b/libjava/classpath/gnu/xml/stream/XMLEventAllocatorImpl.java index dd2b18c..a1824bf 100644 --- a/libjava/classpath/gnu/xml/stream/XMLEventAllocatorImpl.java +++ b/libjava/classpath/gnu/xml/stream/XMLEventAllocatorImpl.java @@ -1,4 +1,4 @@ -/* XMLEventAllocatorImpl.java -- +/* XMLEventAllocatorImpl.java -- Copyright (C) 2005,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -188,7 +188,7 @@ public class XMLEventAllocatorImpl { return new XMLEventAllocatorImpl(); } - + protected boolean isWhitespace(String text) { int len = text.length(); @@ -200,6 +200,5 @@ public class XMLEventAllocatorImpl } return true; } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/XMLEventFactoryImpl.java b/libjava/classpath/gnu/xml/stream/XMLEventFactoryImpl.java index 5ca1aab..12f7f2c 100644 --- a/libjava/classpath/gnu/xml/stream/XMLEventFactoryImpl.java +++ b/libjava/classpath/gnu/xml/stream/XMLEventFactoryImpl.java @@ -1,4 +1,4 @@ -/* XMLEventFactoryImpl.java -- +/* XMLEventFactoryImpl.java -- Copyright (C) 2005,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -81,7 +81,7 @@ public class XMLEventFactoryImpl new QName(namespaceURI, localName, prefix), value, "CDATA", true); } - + public Attribute createAttribute(String localName, String value) { return new AttributeImpl(location, @@ -117,7 +117,7 @@ public class XMLEventFactoryImpl createLinkedList(namespaces), null); } - + public StartElement createStartElement(String prefix, String namespaceUri, String localName) @@ -155,7 +155,7 @@ public class XMLEventFactoryImpl createLinkedList(namespaces), context); } - + public EndElement createEndElement(QName name, Iterator namespaces) { @@ -171,7 +171,7 @@ public class XMLEventFactoryImpl new QName(namespaceUri, localName, prefix), Collections.EMPTY_LIST); } - + public EndElement createEndElement(String prefix, String namespaceUri, String localName, @@ -215,7 +215,7 @@ public class XMLEventFactoryImpl return new StartDocumentImpl(location, null, encoding, version, standalone, true, true); } - + public StartDocument createStartDocument(String encoding, String version) { @@ -265,6 +265,5 @@ public class XMLEventFactoryImpl ret.add(i.next()); return ret; } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/XMLEventImpl.java b/libjava/classpath/gnu/xml/stream/XMLEventImpl.java index 8d73b17..2e650bf 100644 --- a/libjava/classpath/gnu/xml/stream/XMLEventImpl.java +++ b/libjava/classpath/gnu/xml/stream/XMLEventImpl.java @@ -1,4 +1,4 @@ -/* XMLEventImpl.java -- +/* XMLEventImpl.java -- Copyright (C) 2005,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -136,7 +136,7 @@ public abstract class XMLEventImpl { return null; } - + public abstract void writeAsEncodedUnicode(Writer writer) throws XMLStreamException; @@ -192,8 +192,7 @@ public abstract class XMLEventImpl buf.append(c); } } - return (buf == null) ? text : buf.toString(); + return (buf == null) ? text : buf.toString(); } } - diff --git a/libjava/classpath/gnu/xml/stream/XMLEventReaderImpl.java b/libjava/classpath/gnu/xml/stream/XMLEventReaderImpl.java index bb64b1e..bab6d93 100644 --- a/libjava/classpath/gnu/xml/stream/XMLEventReaderImpl.java +++ b/libjava/classpath/gnu/xml/stream/XMLEventReaderImpl.java @@ -1,4 +1,4 @@ -/* XMLEventReaderImpl.java -- +/* XMLEventReaderImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -102,7 +102,7 @@ public class XMLEventReaderImpl return false; } } - + public XMLEvent peek() throws XMLStreamException { @@ -155,4 +155,3 @@ public class XMLEventReaderImpl } } - diff --git a/libjava/classpath/gnu/xml/stream/XMLEventWriterImpl.java b/libjava/classpath/gnu/xml/stream/XMLEventWriterImpl.java index 72b7adc..33b1dce 100644 --- a/libjava/classpath/gnu/xml/stream/XMLEventWriterImpl.java +++ b/libjava/classpath/gnu/xml/stream/XMLEventWriterImpl.java @@ -1,4 +1,4 @@ -/* XMLEventWriterImpl.java -- +/* XMLEventWriterImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -62,7 +62,7 @@ import javax.xml.stream.events.XMLEvent; public class XMLEventWriterImpl implements XMLEventWriter { - + protected final XMLStreamWriter writer; protected XMLEventWriterImpl(XMLStreamWriter writer) @@ -181,11 +181,10 @@ public class XMLEventWriterImpl { writer.setNamespaceContext(context); } - + public NamespaceContext getNamespaceContext() { return writer.getNamespaceContext(); } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/XMLInputFactoryImpl.java b/libjava/classpath/gnu/xml/stream/XMLInputFactoryImpl.java index 5f72e36..87aa321 100644 --- a/libjava/classpath/gnu/xml/stream/XMLInputFactoryImpl.java +++ b/libjava/classpath/gnu/xml/stream/XMLInputFactoryImpl.java @@ -1,4 +1,4 @@ -/* XMLInputFactoryImpl.java -- +/* XMLInputFactoryImpl.java -- Copyright (C) 2005,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -91,7 +91,7 @@ public class XMLInputFactoryImpl { return createXMLStreamReader(null, reader); } - + public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException { @@ -114,13 +114,13 @@ public class XMLInputFactoryImpl replacingEntityReferences); return ret; } - + public XMLStreamReader createXMLStreamReader(InputStream in) throws XMLStreamException { return createXMLStreamReader(null, in); } - + public XMLStreamReader createXMLStreamReader(InputStream in, String encoding) throws XMLStreamException { @@ -175,34 +175,34 @@ public class XMLInputFactoryImpl XMLStreamReader sr = createXMLStreamReader(reader); return new XMLEventReaderImpl(sr, allocator, null); } - + public XMLEventReader createXMLEventReader(String systemId, Reader reader) throws XMLStreamException { XMLStreamReader sr = createXMLStreamReader(systemId, reader); return new XMLEventReaderImpl(sr, allocator, null); } - + public XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException { return new XMLEventReaderImpl(reader, allocator, null); } - + public XMLEventReader createXMLEventReader(Source source) throws XMLStreamException { XMLStreamReader sr = createXMLStreamReader(source); return new XMLEventReaderImpl(sr, allocator, null); } - + public XMLEventReader createXMLEventReader(InputStream in) throws XMLStreamException { XMLStreamReader sr = createXMLStreamReader(in); return new XMLEventReaderImpl(sr, allocator, null); } - + public XMLEventReader createXMLEventReader(InputStream in, String encoding) throws XMLStreamException { @@ -216,7 +216,7 @@ public class XMLInputFactoryImpl XMLStreamReader sr = createXMLStreamReader(systemId, in); return new XMLEventReaderImpl(sr, allocator, null); } - + public XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException @@ -240,7 +240,7 @@ public class XMLInputFactoryImpl { this.resolver = resolver; } - + public XMLReporter getXMLReporter() { return reporter; @@ -327,7 +327,7 @@ public class XMLInputFactoryImpl name.equals("gnu.xml.stream.baseAware") || name.equals("gnu.xml.stream.xIncludeAware"); } - + public void setEventAllocator(XMLEventAllocator allocator) { this.allocator = allocator; @@ -393,6 +393,5 @@ public class XMLInputFactoryImpl } return in; } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/XMLOutputFactoryImpl.java b/libjava/classpath/gnu/xml/stream/XMLOutputFactoryImpl.java index c8c651f..d849e8b 100644 --- a/libjava/classpath/gnu/xml/stream/XMLOutputFactoryImpl.java +++ b/libjava/classpath/gnu/xml/stream/XMLOutputFactoryImpl.java @@ -1,4 +1,4 @@ -/* XMLOutputFactoryImpl.java -- +/* XMLOutputFactoryImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -149,7 +149,7 @@ public class XMLOutputFactoryImpl } throw new UnsupportedOperationException(); } - + public void setProperty(String name, Object value) throws IllegalArgumentException { @@ -183,6 +183,5 @@ public class XMLOutputFactoryImpl { prefixDefaulting = value; } - -} +} diff --git a/libjava/classpath/gnu/xml/stream/XMLParser.java b/libjava/classpath/gnu/xml/stream/XMLParser.java index 6072a9c..71e8765 100644 --- a/libjava/classpath/gnu/xml/stream/XMLParser.java +++ b/libjava/classpath/gnu/xml/stream/XMLParser.java @@ -1,4 +1,4 @@ -/* XMLParser.java -- +/* XMLParser.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -113,7 +113,7 @@ import gnu.classpath.debug.TeeReader; * @see http://www.w3.org/TR/REC-xml-names * @see http://www.w3.org/TR/xml-names11 * @see http://www.w3.org/TR/xmlbase/ - * + * * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class XMLParser @@ -168,7 +168,7 @@ public class XMLParser * Stack of end-entity events to be reported. */ private LinkedList endEntityStack = new LinkedList(); - + /** * Current parser state within the main state machine. */ @@ -224,7 +224,7 @@ public class XMLParser * Temporary Unicode character buffer used during character data reads. */ private int[] tmpBuf = new int[1024]; - + /** * The element content model for the current element. */ @@ -682,7 +682,7 @@ public class XMLParser String elementName = buf.toString(); return doctype.isAttributeDeclared(elementName, qn); } - + public String getCharacterEncodingScheme() { return xmlEncoding; @@ -1022,7 +1022,7 @@ public class XMLParser { return (event != XMLStreamConstants.END_DOCUMENT && event != -1); } - + public int next() throws XMLStreamException { @@ -1253,7 +1253,7 @@ public class XMLParser { return input.read(b, off, len); } - + /** * Parsed character read. */ @@ -1415,7 +1415,7 @@ public class XMLParser "U+" + Integer.toHexString(c)); } else if (!isChar(c)) - error("illegal XML character", + error("illegal XML character", "U+" + Integer.toHexString(c)); buf.append(Character.toChars(c)); } @@ -1635,7 +1635,7 @@ public class XMLParser // We can't use java.net.URL here to do the parsing, as it searches for // a protocol handler. A protocol handler may not be registered for the // URL scheme here. Do it manually. - // + // // Set aside scheme and host portion of base URL String basePrefix = null; ci = base.indexOf(':'); @@ -1780,7 +1780,7 @@ public class XMLParser throws IOException, XMLStreamException { final int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; - + requireWhitespace(); require("version"); readEq(); @@ -1791,9 +1791,9 @@ public class XMLParser input.xml11 = true; else throw new XMLStreamException("illegal XML version: " + xmlVersion); - + boolean white = tryWhitespace(); - + if (tryRead("encoding")) { if (!white) @@ -1802,7 +1802,7 @@ public class XMLParser xmlEncoding = readLiteral(flags, false); white = tryWhitespace(); } - + if (tryRead("standalone")) { if (!white) @@ -1837,7 +1837,7 @@ public class XMLParser ExternalIds ids = readExternalIds(false, true); doctype = this.new Doctype(rootName, ids.publicId, ids.systemId); - + // Parse internal subset first skipWhitespace(); if (tryRead('[')) @@ -2075,7 +2075,7 @@ public class XMLParser { int separator; ElementContentModel model = new ElementContentModel(); - + // Parse first content particle skipWhitespace(); model.addContentParticle(readContentParticle(acc)); @@ -2375,7 +2375,7 @@ public class XMLParser int flags = LIT_ATTRIBUTE; String value = null, defaultType = null; boolean saved = expandPE; - + if (!"CDATA".equals(type)) flags |= LIT_NORMALIZE; @@ -2599,7 +2599,7 @@ public class XMLParser int c; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; ExternalIds ids = new ExternalIds(); - + if (tryRead("PUBLIC")) { requireWhitespace(); @@ -3300,7 +3300,7 @@ public class XMLParser */ private void readEq() throws IOException, XMLStreamException - { + { skipWhitespace(); require('='); skipWhitespace(); @@ -3569,7 +3569,7 @@ public class XMLParser { return readNmtoken(isName, nmtokenBuf); } - + /** * Parses an NMTOKEN or Name production using the specified buffer. * @param isName if a Name, otherwise an NMTOKEN @@ -4123,7 +4123,7 @@ public class XMLParser (c >= 0x10000 && c < 0x110000) || c == 0xa || c == 0x9 || c == 0xd; } - + /** * Interns the specified text or not, depending on the value of * stringInterning. @@ -4141,7 +4141,7 @@ public class XMLParser { error(message, null); } - + /** * Report a parsing error. */ @@ -4403,7 +4403,7 @@ public class XMLParser { event = reader.next(); Location loc = reader.getLocation(); - System.out.print(loc.getLineNumber() + ":" + + System.out.print(loc.getLineNumber() + ":" + loc.getColumnNumber() + " "); switch (event) { @@ -4579,7 +4579,7 @@ public class XMLParser String uri = getNamespaceURI(prefix); if (uri == null && (auri == null || (input.xml11 && "".equals(auri)))) - return true; + return true; if (uri != null) { if ("".equals(uri) && input.xml11 && "".equals(auri)) @@ -4615,7 +4615,7 @@ public class XMLParser buf.append(']'); return buf.toString(); } - + } /** @@ -4661,7 +4661,7 @@ public class XMLParser /** * Map of anonymous keys to comments. - */ + */ private final LinkedHashMap comments = new LinkedHashMap(); /** @@ -4753,7 +4753,7 @@ public class XMLParser if (inExternalSubset) externalEntities.add(name); } - + /** * Adds an entity declaration. * @param name the entity name @@ -4916,7 +4916,7 @@ public class XMLParser { return entries.iterator(); } - + } /** @@ -4950,7 +4950,7 @@ public class XMLParser static final int ANY = 1; static final int ELEMENT = 2; static final int MIXED = 3; - + int min; int max; final int type; @@ -4963,7 +4963,7 @@ public class XMLParser min = 1; max = 1; } - + } /** @@ -4972,14 +4972,14 @@ public class XMLParser class EmptyContentModel extends ContentModel { - + EmptyContentModel() { super(ContentModel.EMPTY); min = 0; max = 0; } - + } /** @@ -4988,14 +4988,14 @@ public class XMLParser class AnyContentModel extends ContentModel { - + AnyContentModel() { super(ContentModel.ANY); min = 0; max = -1; } - + } /** @@ -5008,7 +5008,7 @@ public class XMLParser LinkedList contentParticles; boolean or; String regex; // regular expression cache - + ElementContentModel() { super(ContentModel.ELEMENT); @@ -5019,7 +5019,7 @@ public class XMLParser { contentParticles.add(cp); } - + } class ContentParticle @@ -5028,7 +5028,7 @@ public class XMLParser int min = 1; int max = 1; Object content; // Name (String) or ElementContentModel - + } /** @@ -5039,7 +5039,7 @@ public class XMLParser { private HashSet names; - + MixedContentModel() { super(ContentModel.MIXED); @@ -5055,7 +5055,7 @@ public class XMLParser { return names.contains(name); } - + } /** @@ -5063,7 +5063,7 @@ public class XMLParser */ class AttributeDecl { - + /** * The attribute type (CDATA, ID, etc). */ @@ -5105,7 +5105,7 @@ public class XMLParser this.values = values; this.external = external; } - + } /** @@ -5114,14 +5114,14 @@ public class XMLParser static class Input implements Location { - + int line = 1, markLine; int column, markColumn; int offset, markOffset; final String publicId, systemId, name; final boolean report; // report start- and end-entity final boolean normalize; // normalize CR, etc to LF - + InputStream in; Reader reader; UnicodeReader unicodeReader; @@ -5161,12 +5161,12 @@ public class XMLParser } // -- Location -- - + public int getCharacterOffset() { return offset; } - + public int getColumnNumber() { return column; @@ -5295,7 +5295,7 @@ public class XMLParser } // Detection of input encoding - + private static final int[] SIGNATURE_UCS_4_1234 = new int[] { 0x00, 0x00, 0x00, 0x3c }; private static final int[] SIGNATURE_UCS_4_4321 = @@ -5316,7 +5316,7 @@ public class XMLParser new int[] { 0x3c, 0x3f, 0x78, 0x6d }; private static final int[] SIGNATURE_UTF_8_BOM = new int[] { 0xef, 0xbb, 0xbf }; - + /** * Detect the input encoding. */ @@ -5351,7 +5351,7 @@ public class XMLParser else if (equals(SIGNATURE_UCS_4_2143, signature) || equals(SIGNATURE_UCS_4_3412, signature)) throw new UnsupportedEncodingException("unsupported UCS-4 byte ordering"); - + // 2-byte encodings else if (equals(SIGNATURE_UCS_2_12, signature)) { @@ -5401,7 +5401,7 @@ public class XMLParser } return true; } - + void setInputEncoding(String encoding) throws IOException { @@ -5432,4 +5432,3 @@ public class XMLParser } } - diff --git a/libjava/classpath/gnu/xml/stream/XMLStreamWriterImpl.java b/libjava/classpath/gnu/xml/stream/XMLStreamWriterImpl.java index 1549420..83b8f72 100644 --- a/libjava/classpath/gnu/xml/stream/XMLStreamWriterImpl.java +++ b/libjava/classpath/gnu/xml/stream/XMLStreamWriterImpl.java @@ -1,4 +1,4 @@ -/* XMLStreamWriterImpl.java -- +/* XMLStreamWriterImpl.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -84,7 +84,7 @@ public class XMLStreamWriterImpl * in scope. */ protected NamespaceContext namespaceContext; - + /** * The stack of elements in scope. * Used to close the remaining elements. @@ -100,7 +100,7 @@ public class XMLStreamWriterImpl * Whether we are in an empty element. */ private boolean emptyElement; - + private NamespaceSupport namespaces; private int count = 0; @@ -153,10 +153,10 @@ public class XMLStreamWriterImpl endStartElement(); namespaces.pushContext(); - + writer.write('<'); writer.write(localName); - + elements.addLast(new String[] { null, localName }); inStartElement = true; } @@ -180,7 +180,7 @@ public class XMLStreamWriterImpl endStartElement(); namespaces.pushContext(); - + String prefix = getPrefix(namespaceURI); boolean isDeclared = (prefix != null); if (!isDeclared) @@ -203,7 +203,7 @@ public class XMLStreamWriterImpl { writeNamespaceImpl(prefix, namespaceURI); } - + elements.addLast(new String[] { prefix, localName }); } catch (IOException e) @@ -249,7 +249,7 @@ public class XMLStreamWriterImpl endStartElement(); namespaces.pushContext(); - + String currentPrefix = getPrefix(namespaceURI); boolean isCurrent = prefix.equals(currentPrefix); writer.write('<'); @@ -263,7 +263,7 @@ public class XMLStreamWriterImpl { writeNamespaceImpl(prefix, namespaceURI); } - + elements.addLast(new String[] { prefix, localName }); inStartElement = true; } @@ -451,7 +451,7 @@ public class XMLStreamWriterImpl throw new IllegalArgumentException("illegal Name: " + localName); if (!isChars(value)) throw new IllegalArgumentException("illegal character: " + value); - + String prefix = getPrefix(namespaceURI); if (prefix == null) { @@ -522,7 +522,7 @@ public class XMLStreamWriterImpl prefix = XMLConstants.DEFAULT_NS_PREFIX; setPrefix(prefix, namespaceURI); - + writer.write(' '); writer.write("xmlns"); if (!XMLConstants.DEFAULT_NS_PREFIX.equals(prefix)) @@ -566,7 +566,7 @@ public class XMLStreamWriterImpl throw new IllegalArgumentException("illegal comment: " + data); endStartElement(); - + writer.write("<!--"); if (hasXML11RestrictedChars) { @@ -651,7 +651,7 @@ public class XMLStreamWriterImpl throw new IllegalArgumentException("illegal XML character: " + data); if (data.indexOf("]]") != -1) throw new IllegalArgumentException("illegal CDATA section: " + data); - + endStartElement(); writer.write("<![CDATA["); @@ -1012,7 +1012,5 @@ public class XMLStreamWriterImpl } return true; } - -} - +} diff --git a/libjava/classpath/gnu/xml/transform/AbstractNumberNode.java b/libjava/classpath/gnu/xml/transform/AbstractNumberNode.java index fb953e4..6e478bd 100644 --- a/libjava/classpath/gnu/xml/transform/AbstractNumberNode.java +++ b/libjava/classpath/gnu/xml/transform/AbstractNumberNode.java @@ -1,4 +1,4 @@ -/* AbstractNumberNode.java -- +/* AbstractNumberNode.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -102,7 +102,7 @@ abstract class AbstractNumberNode // xsl:number doesn't process children if (next != null) { - next.apply(stylesheet, mode, + next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } @@ -148,7 +148,7 @@ abstract class AbstractNumberNode for (int i = 0; i < len; i++) { String token = (i < 0) ? "." : (String) tokens.get(i); - boolean alpha = (i < 0) ? true : + boolean alpha = (i < 0) ? true : ((Boolean) types.get(i)).booleanValue(); if (!alpha) { @@ -304,7 +304,7 @@ abstract class AbstractNumberNode } return upper ? buf.toString().toUpperCase() : buf.toString(); } - + abstract int[] compute(Stylesheet stylesheet, Node context, int pos, int len) throws TransformerException; diff --git a/libjava/classpath/gnu/xml/transform/ApplyImportsNode.java b/libjava/classpath/gnu/xml/transform/ApplyImportsNode.java index 4b06eea..298c49d 100644 --- a/libjava/classpath/gnu/xml/transform/ApplyImportsNode.java +++ b/libjava/classpath/gnu/xml/transform/ApplyImportsNode.java @@ -1,4 +1,4 @@ -/* ApplyImportsNode.java -- +/* ApplyImportsNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -59,7 +59,7 @@ final class ApplyImportsNode ret.next = next.clone(stylesheet); return ret; } - + void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) @@ -80,4 +80,3 @@ final class ApplyImportsNode } } - diff --git a/libjava/classpath/gnu/xml/transform/ApplyTemplatesNode.java b/libjava/classpath/gnu/xml/transform/ApplyTemplatesNode.java index 0daaa7a..6aa3695 100644 --- a/libjava/classpath/gnu/xml/transform/ApplyTemplatesNode.java +++ b/libjava/classpath/gnu/xml/transform/ApplyTemplatesNode.java @@ -1,4 +1,4 @@ -/* ApplyTemplatesNode.java -- +/* ApplyTemplatesNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -191,7 +191,7 @@ final class ApplyTemplatesNode } return super.references(var); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder("apply-templates"); @@ -215,5 +215,5 @@ final class ApplyTemplatesNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/AttributeNode.java b/libjava/classpath/gnu/xml/transform/AttributeNode.java index bbc4e08..4c71f6a 100644 --- a/libjava/classpath/gnu/xml/transform/AttributeNode.java +++ b/libjava/classpath/gnu/xml/transform/AttributeNode.java @@ -1,4 +1,4 @@ -/* AttributeNode.java -- +/* AttributeNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -61,7 +61,7 @@ final class AttributeNode final TemplateNode name; final TemplateNode namespace; final Node source; - + AttributeNode(TemplateNode name, TemplateNode namespace, Node source) { @@ -98,10 +98,10 @@ final class AttributeNode fragment, null); // Use XPath string-value of fragment String nameValue = Expr.stringValue(fragment); - + String namespaceValue = null; if (namespace != null) - { + { // Create a document fragment to hold the namespace fragment = doc.createDocumentFragment(); // Apply namespace to the fragment @@ -113,7 +113,7 @@ final class AttributeNode if (namespaceValue.length() == 0) namespaceValue = null; } - + String prefix = getPrefix(nameValue); if (namespaceValue == null) { @@ -230,7 +230,7 @@ final class AttributeNode return true; return super.references(var); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder("attribute"); @@ -240,5 +240,5 @@ final class AttributeNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/AttributeSet.java b/libjava/classpath/gnu/xml/transform/AttributeSet.java index 3ece9c8..ced50f1 100644 --- a/libjava/classpath/gnu/xml/transform/AttributeSet.java +++ b/libjava/classpath/gnu/xml/transform/AttributeSet.java @@ -1,4 +1,4 @@ -/* AttributeSet.java -- +/* AttributeSet.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -62,6 +62,5 @@ final class AttributeSet children.clone(stylesheet), name, uas); } - -} +} diff --git a/libjava/classpath/gnu/xml/transform/Bindings.java b/libjava/classpath/gnu/xml/transform/Bindings.java index ab79052..37d45880 100644 --- a/libjava/classpath/gnu/xml/transform/Bindings.java +++ b/libjava/classpath/gnu/xml/transform/Bindings.java @@ -1,4 +1,4 @@ -/* Bindings.java -- +/* Bindings.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -202,7 +202,7 @@ public class Bindings if (ret == null) { for (Iterator<Map<QName,Object>> i = variables.iterator(); - i.hasNext() && ret == null; ) + i.hasNext() && ret == null; ) { Map<QName,Object> vctx = i.next(); ret = vctx.get(name); @@ -212,7 +212,7 @@ public class Bindings if (ret == null) { for (Iterator<Map<QName,Object>> i = parameters.iterator(); - i.hasNext() && ret == null; ) + i.hasNext() && ret == null; ) { Map<QName,Object> pctx = i.next(); ret = pctx.get(name); @@ -260,7 +260,7 @@ public class Bindings { return get(qName, null, 1, 1); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder(); @@ -311,7 +311,7 @@ public class Bindings buf.append(entry.getValue()); seen.add(key); } - } + } } buf.append('}'); next = false; @@ -337,7 +337,7 @@ public class Bindings buf.append(entry.getValue()); seen.add(key); } - } + } } buf.append(']'); return buf.toString(); diff --git a/libjava/classpath/gnu/xml/transform/CallTemplateNode.java b/libjava/classpath/gnu/xml/transform/CallTemplateNode.java index fe0eea7..cc08d93 100644 --- a/libjava/classpath/gnu/xml/transform/CallTemplateNode.java +++ b/libjava/classpath/gnu/xml/transform/CallTemplateNode.java @@ -1,4 +1,4 @@ -/* CallTemplateNode.java -- +/* CallTemplateNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -132,17 +132,17 @@ final class CallTemplateNode context, pos, len, parent, nextSibling); } - + public boolean references(QName var) { for (Iterator i = withParams.iterator(); i.hasNext(); ) { - if (((WithParam) i.next()).references(var)) - return true; + if (((WithParam) i.next()).references(var)) + return true; } return super.references(var); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder("call-template"); @@ -152,5 +152,5 @@ final class CallTemplateNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/ChooseNode.java b/libjava/classpath/gnu/xml/transform/ChooseNode.java index fe2dc0c..262cde1 100644 --- a/libjava/classpath/gnu/xml/transform/ChooseNode.java +++ b/libjava/classpath/gnu/xml/transform/ChooseNode.java @@ -1,4 +1,4 @@ -/* ChooseNode.java -- +/* ChooseNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -76,7 +76,7 @@ final class ChooseNode context, pos, len, parent, nextSibling); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder("choose"); @@ -84,5 +84,5 @@ final class ChooseNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/CommentNode.java b/libjava/classpath/gnu/xml/transform/CommentNode.java index 8131fb2..1c14e5f 100644 --- a/libjava/classpath/gnu/xml/transform/CommentNode.java +++ b/libjava/classpath/gnu/xml/transform/CommentNode.java @@ -1,4 +1,4 @@ -/* CommentNode.java -- +/* CommentNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,10 +94,10 @@ final class CommentNode context, pos, len, parent, nextSibling); } - + public String toString() { return "comment"; } - + } diff --git a/libjava/classpath/gnu/xml/transform/CopyNode.java b/libjava/classpath/gnu/xml/transform/CopyNode.java index bae628d..9cc2fde 100644 --- a/libjava/classpath/gnu/xml/transform/CopyNode.java +++ b/libjava/classpath/gnu/xml/transform/CopyNode.java @@ -1,4 +1,4 @@ -/* CopyNode.java -- +/* CopyNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -127,7 +127,7 @@ final class CopyNode context, pos, len, parent, nextSibling); } - + void addAttributeSet(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling, String attributeSet) diff --git a/libjava/classpath/gnu/xml/transform/CopyOfNode.java b/libjava/classpath/gnu/xml/transform/CopyOfNode.java index 4ce8432..2b06fed 100644 --- a/libjava/classpath/gnu/xml/transform/CopyOfNode.java +++ b/libjava/classpath/gnu/xml/transform/CopyOfNode.java @@ -1,4 +1,4 @@ -/* CopyOfNode.java -- +/* CopyOfNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -153,14 +153,14 @@ final class CopyOfNode context, pos, len, parent, nextSibling); } - + public boolean references(QName var) { if (select != null && select.references(var)) return true; return super.references(var); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder("copy-of"); @@ -170,5 +170,5 @@ final class CopyOfNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/CurrentFunction.java b/libjava/classpath/gnu/xml/transform/CurrentFunction.java index 0395396..9689967 100644 --- a/libjava/classpath/gnu/xml/transform/CurrentFunction.java +++ b/libjava/classpath/gnu/xml/transform/CurrentFunction.java @@ -1,4 +1,4 @@ -/* CurrentFunction.java -- +/* CurrentFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -101,4 +101,3 @@ final class CurrentFunction } } - diff --git a/libjava/classpath/gnu/xml/transform/DOMSourceLocator.java b/libjava/classpath/gnu/xml/transform/DOMSourceLocator.java index 9bc8fb1..fbf31de 100644 --- a/libjava/classpath/gnu/xml/transform/DOMSourceLocator.java +++ b/libjava/classpath/gnu/xml/transform/DOMSourceLocator.java @@ -1,4 +1,4 @@ -/* DOMSourceLocator.java -- +/* DOMSourceLocator.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -80,5 +80,5 @@ class DOMSourceLocator { return -1; } - + } diff --git a/libjava/classpath/gnu/xml/transform/DocumentFunction.java b/libjava/classpath/gnu/xml/transform/DocumentFunction.java index 29f3d4a..d0aee25 100644 --- a/libjava/classpath/gnu/xml/transform/DocumentFunction.java +++ b/libjava/classpath/gnu/xml/transform/DocumentFunction.java @@ -1,4 +1,4 @@ -/* DocumentFunction.java -- +/* DocumentFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -86,7 +86,7 @@ final class DocumentFunction { this.args = args; } - + public Object evaluate(Node context, int pos, int len) { int arity = args.size(); @@ -165,7 +165,7 @@ final class DocumentFunction { if ("".equals(uri) || uri == null) uri = this.base.getBaseURI(); - + // Get fragment Expr fragment = null; int hi = uri.indexOf('#'); @@ -240,5 +240,5 @@ final class DocumentFunction } return false; } - + } diff --git a/libjava/classpath/gnu/xml/transform/ElementAvailableFunction.java b/libjava/classpath/gnu/xml/transform/ElementAvailableFunction.java index aa15981..6a9d256 100644 --- a/libjava/classpath/gnu/xml/transform/ElementAvailableFunction.java +++ b/libjava/classpath/gnu/xml/transform/ElementAvailableFunction.java @@ -1,4 +1,4 @@ -/* ElementAvailableFunction.java -- +/* ElementAvailableFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -148,7 +148,7 @@ class ElementAvailableFunction // TODO extension elements return Boolean.FALSE; } - + public Expr clone(Object context) { NamespaceContext n = nsctx; @@ -179,4 +179,3 @@ class ElementAvailableFunction } } - diff --git a/libjava/classpath/gnu/xml/transform/ElementNode.java b/libjava/classpath/gnu/xml/transform/ElementNode.java index c5a4dd2..78a2007 100644 --- a/libjava/classpath/gnu/xml/transform/ElementNode.java +++ b/libjava/classpath/gnu/xml/transform/ElementNode.java @@ -1,4 +1,4 @@ -/* ElementNode.java -- +/* ElementNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -68,7 +68,7 @@ final class ElementNode final String uas; final Node source; final Collection elementExcludeResultPrefixes; - + ElementNode(TemplateNode name, TemplateNode namespace, String uas, Node source) { @@ -134,7 +134,7 @@ final class ElementNode namespaceValue = null; } else - { + { String prefix = getPrefix(nameValue); if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) { @@ -169,7 +169,7 @@ final class ElementNode } } } - + // Create element Element element = (namespaceValue != null) ? doc.createElementNS(namespaceValue, nameValue) : @@ -237,7 +237,7 @@ final class ElementNode return true; return super.references(var); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder("element"); @@ -257,5 +257,5 @@ final class ElementNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/ErrorListenerErrorHandler.java b/libjava/classpath/gnu/xml/transform/ErrorListenerErrorHandler.java index d79bb15..8a28795 100644 --- a/libjava/classpath/gnu/xml/transform/ErrorListenerErrorHandler.java +++ b/libjava/classpath/gnu/xml/transform/ErrorListenerErrorHandler.java @@ -1,4 +1,4 @@ -/* ErrorListenerErrorHandler.java -- +/* ErrorListenerErrorHandler.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -71,7 +71,7 @@ class ErrorListenerErrorHandler throw new SAXException(e2); } } - + public void error(SAXParseException e) throws SAXException { @@ -84,7 +84,7 @@ class ErrorListenerErrorHandler throw new SAXException(e2); } } - + public void fatalError(SAXParseException e) throws SAXException { @@ -97,5 +97,5 @@ class ErrorListenerErrorHandler throw new SAXException(e2); } } - + } diff --git a/libjava/classpath/gnu/xml/transform/ForEachNode.java b/libjava/classpath/gnu/xml/transform/ForEachNode.java index 8908114..1613f76 100644 --- a/libjava/classpath/gnu/xml/transform/ForEachNode.java +++ b/libjava/classpath/gnu/xml/transform/ForEachNode.java @@ -1,4 +1,4 @@ -/* ForEachNode.java -- +/* ForEachNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -97,25 +97,25 @@ final class ForEachNode //System.err.println(toString() + ": " + context+" -> "+ret); if (ret instanceof Collection) { - /* Suppression is safe, as we know context produces Collection<Node> */ - @SuppressWarnings("unchecked") - Collection<Node> ns = (Collection<Node>) ret; + /* Suppression is safe, as we know context produces Collection<Node> */ + @SuppressWarnings("unchecked") + Collection<Node> ns = (Collection<Node>) ret; List<Node> list = new ArrayList<Node>(ns); - if (!sortKeys.isEmpty()) - { - for (SortKey sortKey : sortKeys) - { - sortKey.init(stylesheet, mode, context, pos, len, parent, - nextSibling); - } - Collections.sort(list, new XSLComparator(sortKeys)); - } - else + if (!sortKeys.isEmpty()) + { + for (SortKey sortKey : sortKeys) + { + sortKey.init(stylesheet, mode, context, pos, len, parent, + nextSibling); + } + Collections.sort(list, new XSLComparator(sortKeys)); + } + else Collections.sort(list, documentOrderComparator); // Perform children for each node int l = list.size(); int p = 1; - for (Node node : list) + for (Node node : list) { stylesheet.current = node; children.apply(stylesheet, mode, @@ -139,8 +139,8 @@ final class ForEachNode return true; for (Iterator<SortKey> i = sortKeys.iterator(); i.hasNext(); ) { - if (i.next().references(var)) - return true; + if (i.next().references(var)) + return true; } return super.references(var); } @@ -155,5 +155,5 @@ final class ForEachNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/FormatNumberFunction.java b/libjava/classpath/gnu/xml/transform/FormatNumberFunction.java index 34717b3..82872be 100644 --- a/libjava/classpath/gnu/xml/transform/FormatNumberFunction.java +++ b/libjava/classpath/gnu/xml/transform/FormatNumberFunction.java @@ -1,4 +1,4 @@ -/* FormatNumberFunction.java -- +/* FormatNumberFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -143,4 +143,3 @@ final class FormatNumberFunction } } - diff --git a/libjava/classpath/gnu/xml/transform/FunctionAvailableFunction.java b/libjava/classpath/gnu/xml/transform/FunctionAvailableFunction.java index ab86401..1ac5032 100644 --- a/libjava/classpath/gnu/xml/transform/FunctionAvailableFunction.java +++ b/libjava/classpath/gnu/xml/transform/FunctionAvailableFunction.java @@ -1,4 +1,4 @@ -/* FunctionAvailableFunction.java -- +/* FunctionAvailableFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -159,7 +159,7 @@ class FunctionAvailableFunction // TODO extension functions return Boolean.FALSE; } - + public Expr clone(Object context) { NamespaceContext n = nsctx; @@ -190,4 +190,3 @@ class FunctionAvailableFunction } } - diff --git a/libjava/classpath/gnu/xml/transform/GenerateIdFunction.java b/libjava/classpath/gnu/xml/transform/GenerateIdFunction.java index f0d3e6d..efc583c 100644 --- a/libjava/classpath/gnu/xml/transform/GenerateIdFunction.java +++ b/libjava/classpath/gnu/xml/transform/GenerateIdFunction.java @@ -1,4 +1,4 @@ -/* GenerateIdFunction.java -- +/* GenerateIdFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -137,4 +137,3 @@ final class GenerateIdFunction } } - diff --git a/libjava/classpath/gnu/xml/transform/IfNode.java b/libjava/classpath/gnu/xml/transform/IfNode.java index eeb2941..f31fed5 100644 --- a/libjava/classpath/gnu/xml/transform/IfNode.java +++ b/libjava/classpath/gnu/xml/transform/IfNode.java @@ -1,4 +1,4 @@ -/* IfNode.java -- +/* IfNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -91,14 +91,14 @@ final class IfNode context, pos, len, parent, nextSibling); } - + public boolean references(QName var) { if (test != null && test.references(var)) return true; return super.references(var); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder("if"); @@ -108,5 +108,5 @@ final class IfNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/Key.java b/libjava/classpath/gnu/xml/transform/Key.java index 72bd90a..18d8339 100644 --- a/libjava/classpath/gnu/xml/transform/Key.java +++ b/libjava/classpath/gnu/xml/transform/Key.java @@ -1,4 +1,4 @@ -/* Key.java -- +/* Key.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -66,6 +66,5 @@ class Key (Pattern) match.clone(stylesheet), use.clone(stylesheet)); } - -} +} diff --git a/libjava/classpath/gnu/xml/transform/KeyFunction.java b/libjava/classpath/gnu/xml/transform/KeyFunction.java index a705dc6..b962626 100644 --- a/libjava/classpath/gnu/xml/transform/KeyFunction.java +++ b/libjava/classpath/gnu/xml/transform/KeyFunction.java @@ -1,4 +1,4 @@ -/* KeyFunction.java -- +/* KeyFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -104,7 +104,7 @@ final class KeyFunction // Expand qualified name String uri = keyName.getNamespaceURI(); String prefix = keyName.getPrefix(); - if ((uri == null || uri.length() == 0) && + if ((uri == null || uri.length() == 0) && (prefix != null && prefix.length() > 0)) { uri = stylesheet.getNamespaceURI(prefix); @@ -158,7 +158,7 @@ final class KeyFunction addKeyNodes(ctx, keySet, value, acc); } } - + final void addKeyNodeIfMatch(Node node, Collection keySet, String value, Collection acc) { @@ -225,4 +225,3 @@ final class KeyFunction } } - diff --git a/libjava/classpath/gnu/xml/transform/LiteralNode.java b/libjava/classpath/gnu/xml/transform/LiteralNode.java index d4e283a..3405b33 100644 --- a/libjava/classpath/gnu/xml/transform/LiteralNode.java +++ b/libjava/classpath/gnu/xml/transform/LiteralNode.java @@ -1,4 +1,4 @@ -/* LiteralNode.java -- +/* LiteralNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -198,5 +198,5 @@ final class LiteralNode { return source.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/MessageNode.java b/libjava/classpath/gnu/xml/transform/MessageNode.java index a7eeeee..3e4899a 100644 --- a/libjava/classpath/gnu/xml/transform/MessageNode.java +++ b/libjava/classpath/gnu/xml/transform/MessageNode.java @@ -1,4 +1,4 @@ -/* MessageNode.java -- +/* MessageNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -106,5 +106,5 @@ final class MessageNode } return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/NamespaceProxy.java b/libjava/classpath/gnu/xml/transform/NamespaceProxy.java index b3c233c..695fbeb 100644 --- a/libjava/classpath/gnu/xml/transform/NamespaceProxy.java +++ b/libjava/classpath/gnu/xml/transform/NamespaceProxy.java @@ -1,4 +1,4 @@ -/* NamespaceProxy.java -- +/* NamespaceProxy.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -57,7 +57,7 @@ class NamespaceProxy { this.node = node; } - + public String getNamespaceURI(String prefix) { return (node == null) ? null : node.lookupNamespaceURI(prefix); diff --git a/libjava/classpath/gnu/xml/transform/NodeNumberNode.java b/libjava/classpath/gnu/xml/transform/NodeNumberNode.java index 0427686..6663db3 100644 --- a/libjava/classpath/gnu/xml/transform/NodeNumberNode.java +++ b/libjava/classpath/gnu/xml/transform/NodeNumberNode.java @@ -1,4 +1,4 @@ -/* NodeNumberNode.java -- +/* NodeNumberNode.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -265,5 +265,5 @@ final class NodeNumberNode while (node != null); return index; } - + } diff --git a/libjava/classpath/gnu/xml/transform/NumberNode.java b/libjava/classpath/gnu/xml/transform/NumberNode.java index b19a7b5..cec594b 100644 --- a/libjava/classpath/gnu/xml/transform/NumberNode.java +++ b/libjava/classpath/gnu/xml/transform/NumberNode.java @@ -1,4 +1,4 @@ -/* NumberNode.java -- +/* NumberNode.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -84,5 +84,5 @@ final class NumberNode new Double(Expr._number(context, ret)); return new int[] { d.intValue() }; } - + } diff --git a/libjava/classpath/gnu/xml/transform/OtherwiseNode.java b/libjava/classpath/gnu/xml/transform/OtherwiseNode.java index 9d8168c..0905784 100644 --- a/libjava/classpath/gnu/xml/transform/OtherwiseNode.java +++ b/libjava/classpath/gnu/xml/transform/OtherwiseNode.java @@ -1,4 +1,4 @@ -/* OtherwiseNode.java -- +/* OtherwiseNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -74,10 +74,10 @@ final class OtherwiseNode context, pos, len, parent, nextSibling); } - + public String toString() { return "otherwise"; } - + } diff --git a/libjava/classpath/gnu/xml/transform/ParameterNode.java b/libjava/classpath/gnu/xml/transform/ParameterNode.java index 431fbd3..4f3dc75 100644 --- a/libjava/classpath/gnu/xml/transform/ParameterNode.java +++ b/libjava/classpath/gnu/xml/transform/ParameterNode.java @@ -1,4 +1,4 @@ -/* ParameterNode.java -- +/* ParameterNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -73,8 +73,8 @@ final class ParameterNode ParameterNode clone(Stylesheet stylesheet) { ParameterNode ret = new ParameterNode(name, - select == null ? null : select.clone(stylesheet), - type); + select == null ? null : select.clone(stylesheet), + type); if (children != null) ret.children = children.clone(stylesheet); if (next != null) @@ -106,7 +106,7 @@ final class ParameterNode // pop the variable context stylesheet.bindings.pop(type); } - + Object getValue(Stylesheet stylesheet, QName mode, Node context, int pos, int len) throws TransformerException @@ -124,7 +124,7 @@ final class ParameterNode else return null; } - + public boolean references(QName var) { if (select != null && select.references(var)) @@ -144,7 +144,7 @@ final class ParameterNode return -1; return 0; } - + public String toString() { CPStringBuilder buf = new CPStringBuilder(); @@ -170,4 +170,3 @@ final class ParameterNode } } - diff --git a/libjava/classpath/gnu/xml/transform/ProcessingInstructionNode.java b/libjava/classpath/gnu/xml/transform/ProcessingInstructionNode.java index 655f51f..1e723a8 100644 --- a/libjava/classpath/gnu/xml/transform/ProcessingInstructionNode.java +++ b/libjava/classpath/gnu/xml/transform/ProcessingInstructionNode.java @@ -1,4 +1,4 @@ -/* ProcessingInstructionNode.java -- +/* ProcessingInstructionNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -104,7 +104,7 @@ final class ProcessingInstructionNode context, pos, len, parent, nextSibling); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder("processing-instruction"); @@ -114,5 +114,5 @@ final class ProcessingInstructionNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/SAXSerializer.java b/libjava/classpath/gnu/xml/transform/SAXSerializer.java index 9650e3e..2bd1f97 100644 --- a/libjava/classpath/gnu/xml/transform/SAXSerializer.java +++ b/libjava/classpath/gnu/xml/transform/SAXSerializer.java @@ -1,4 +1,4 @@ -/* SAXSerializer.java -- +/* SAXSerializer.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/transform/SAXTemplatesHandler.java b/libjava/classpath/gnu/xml/transform/SAXTemplatesHandler.java index 2c5a468..24464c0 100644 --- a/libjava/classpath/gnu/xml/transform/SAXTemplatesHandler.java +++ b/libjava/classpath/gnu/xml/transform/SAXTemplatesHandler.java @@ -1,4 +1,4 @@ -/* SAXTemplatesHandler.java -- +/* SAXTemplatesHandler.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/transform/SAXTransformerHandler.java b/libjava/classpath/gnu/xml/transform/SAXTransformerHandler.java index 83cc375..890e151 100644 --- a/libjava/classpath/gnu/xml/transform/SAXTransformerHandler.java +++ b/libjava/classpath/gnu/xml/transform/SAXTransformerHandler.java @@ -1,4 +1,4 @@ -/* SAXTransformerHandler.java -- +/* SAXTransformerHandler.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -107,5 +107,5 @@ class SAXTransformerHandler throw e2; } } - + } diff --git a/libjava/classpath/gnu/xml/transform/SortKey.java b/libjava/classpath/gnu/xml/transform/SortKey.java index 72934a5..dd57df9 100644 --- a/libjava/classpath/gnu/xml/transform/SortKey.java +++ b/libjava/classpath/gnu/xml/transform/SortKey.java @@ -1,4 +1,4 @@ -/* SortKey.java -- +/* SortKey.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -95,7 +95,7 @@ final class SortKey * @param caseOrder the treatment of case when the data type is a string. This * may be "upper-first", "lower-first" or {@code null} if * unspecified. - */ + */ SortKey(Expr select, TemplateNode lang, TemplateNode dataType, TemplateNode order, TemplateNode caseOrder) { @@ -215,10 +215,10 @@ final class SortKey SortKey clone(Stylesheet stylesheet) { return new SortKey(select.clone(stylesheet), - langTemplate == null ? null : cloneAttributeValueTemplate(langTemplate, stylesheet), - dataTypeTemplate == null ? null : cloneAttributeValueTemplate(dataTypeTemplate, stylesheet), - orderTemplate == null ? null : cloneAttributeValueTemplate(orderTemplate, stylesheet), - caseOrderTemplate == null ? null : cloneAttributeValueTemplate(caseOrderTemplate, stylesheet)); + langTemplate == null ? null : cloneAttributeValueTemplate(langTemplate, stylesheet), + dataTypeTemplate == null ? null : cloneAttributeValueTemplate(dataTypeTemplate, stylesheet), + orderTemplate == null ? null : cloneAttributeValueTemplate(orderTemplate, stylesheet), + caseOrderTemplate == null ? null : cloneAttributeValueTemplate(caseOrderTemplate, stylesheet)); } /** diff --git a/libjava/classpath/gnu/xml/transform/StreamSerializer.java b/libjava/classpath/gnu/xml/transform/StreamSerializer.java index 2899672..a5705f8 100644 --- a/libjava/classpath/gnu/xml/transform/StreamSerializer.java +++ b/libjava/classpath/gnu/xml/transform/StreamSerializer.java @@ -1,4 +1,4 @@ -/* StreamSerializer.java -- +/* StreamSerializer.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -67,7 +67,7 @@ import org.w3c.dom.Node; */ public class StreamSerializer { - + static final int SPACE = 0x20; static final int BANG = 0x21; // ! static final int APOS = 0x27; // ' @@ -83,7 +83,7 @@ public class StreamSerializer static { HashSet set; - + set = new HashSet(); set.add("nohref"); HTML_BOOLEAN_ATTRIBUTES.put("area", set); @@ -95,11 +95,11 @@ public class StreamSerializer set = new HashSet(); set.add("declare"); HTML_BOOLEAN_ATTRIBUTES.put("object", set); - + set = new HashSet(); set.add("noshade"); HTML_BOOLEAN_ATTRIBUTES.put("hr", set); - + set = new HashSet(); set.add("compact"); HTML_BOOLEAN_ATTRIBUTES.put("dl", set); @@ -107,46 +107,46 @@ public class StreamSerializer HTML_BOOLEAN_ATTRIBUTES.put("ul", set); HTML_BOOLEAN_ATTRIBUTES.put("dir", set); HTML_BOOLEAN_ATTRIBUTES.put("menu", set); - + set = new HashSet(); set.add("checked"); set.add("disabled"); set.add("readonly"); set.add("ismap"); HTML_BOOLEAN_ATTRIBUTES.put("input", set); - + set = new HashSet(); set.add("multiple"); set.add("disabled"); HTML_BOOLEAN_ATTRIBUTES.put("select", set); - + set = new HashSet(); set.add("disabled"); HTML_BOOLEAN_ATTRIBUTES.put("optgroup", set); - + set = new HashSet(); set.add("selected"); set.add("disabled"); HTML_BOOLEAN_ATTRIBUTES.put("option", set); - + set = new HashSet(); set.add("disabled"); set.add("readonly"); HTML_BOOLEAN_ATTRIBUTES.put("textarea", set); - + set = new HashSet(); set.add("disabled"); HTML_BOOLEAN_ATTRIBUTES.put("button", set); - + set = new HashSet(); set.add("nowrap"); HTML_BOOLEAN_ATTRIBUTES.put("th", set); HTML_BOOLEAN_ATTRIBUTES.put("td", set); - + set = new HashSet(); set.add("noresize"); HTML_BOOLEAN_ATTRIBUTES.put("frame", set); - + set = new HashSet(); set.add("defer"); HTML_BOOLEAN_ATTRIBUTES.put("script", set); @@ -168,7 +168,7 @@ public class StreamSerializer protected boolean discardDefaultContent; protected boolean xmlDeclaration = true; - + // has a META element with the encoding been added? private boolean htmlEncoded; @@ -204,7 +204,7 @@ public class StreamSerializer { serialize(node, out, false); } - + void serialize(Node node, final OutputStream out, boolean convertToCdata) throws IOException diff --git a/libjava/classpath/gnu/xml/transform/StrippingInstruction.java b/libjava/classpath/gnu/xml/transform/StrippingInstruction.java index c6391b9..27e9fc8 100644 --- a/libjava/classpath/gnu/xml/transform/StrippingInstruction.java +++ b/libjava/classpath/gnu/xml/transform/StrippingInstruction.java @@ -1,4 +1,4 @@ -/* StrippingInstruction.java -- +/* StrippingInstruction.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,7 +49,7 @@ class StrippingInstruction final NameTest element; final int precedence; - + StrippingInstruction(NameTest element, int precedence) { this.element = element; @@ -69,5 +69,5 @@ class StrippingInstruction else return 0.0f; } - + } diff --git a/libjava/classpath/gnu/xml/transform/Stylesheet.java b/libjava/classpath/gnu/xml/transform/Stylesheet.java index 30bd95349..786b258 100644 --- a/libjava/classpath/gnu/xml/transform/Stylesheet.java +++ b/libjava/classpath/gnu/xml/transform/Stylesheet.java @@ -1,4 +1,4 @@ -/* Stylesheet.java -- +/* Stylesheet.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -91,7 +91,7 @@ class Stylesheet static final String XSL_NS = "http://www.w3.org/1999/XSL/Transform"; private static final NameTest STYLESHEET_PRESERVE_TEXT = new NameTest(new QName(XSL_NS, "text"), false, false); - + static final int OUTPUT_XML = 0; static final int OUTPUT_HTML = 1; static final int OUTPUT_TEXT = 2; @@ -147,7 +147,7 @@ class Stylesheet * Decimal formats. */ Map<String,DecimalFormat> decimalFormats; - + /** * Namespace aliases. */ @@ -256,16 +256,16 @@ class Stylesheet builtInTextTemplate = new ValueOfNode(new Selector(Selector.SELF, tests), false); - + parse(doc.getDocumentElement(), true); current = doc; // Alow namespace resolution during processing - + debug = ("yes".equals(System.getProperty("xsl.debug"))); if (debug) { System.err.println("Stylesheet: " + doc.getDocumentURI()); - for (Template t : templates) + for (Template t : templates) { t.list(System.err); System.err.println("--------------------"); @@ -280,7 +280,7 @@ class Stylesheet stylesheet = stylesheet.parent; return stylesheet; } - + void initDefaultDecimalFormat() { DecimalFormat defaultDecimalFormat = new DecimalFormat(); @@ -298,7 +298,7 @@ class Stylesheet defaultDecimalFormat.setDecimalFormatSymbols(symbols); decimalFormats.put(null, defaultDecimalFormat); } - + // -- Cloneable -- public Object clone() @@ -309,33 +309,33 @@ class Stylesheet clone.bindings = (Bindings) bindings.clone(); LinkedList<Template> templates2 = new LinkedList<Template>(); - for (Template t : templates) + for (Template t : templates) { templates2.add(t.clone(clone)); } clone.templates = templates2; LinkedList<AttributeSet> attributeSets2 = new LinkedList<AttributeSet>(); - for (AttributeSet as : attributeSets) + for (AttributeSet as : attributeSets) { attributeSets2.add(as.clone(clone)); } clone.attributeSets = attributeSets2; LinkedList<ParameterNode> variables2 = new LinkedList<ParameterNode>(); - for (ParameterNode var : variables) + for (ParameterNode var : variables) { variables2.add(var.clone(clone)); } clone.variables = variables2; LinkedList<Key> keys2 = new LinkedList<Key>(); - for (Key k : keys) + for (Key k : keys) { keys2.add(k.clone(clone)); } clone.keys = keys2; - + return clone; } catch (CloneNotSupportedException e) @@ -395,9 +395,9 @@ class Stylesheet } return new QName(uri, localName, prefix); } - + // -- Template selection -- - + TemplateNode getTemplate(QName mode, Node context, boolean applyImports) throws TransformerException { @@ -632,7 +632,7 @@ class Stylesheet Node attr = attrs.getNamedItem(name); return (attr == null) ? def : attr.getNodeValue(); } - + /** * namespace-alias */ @@ -777,7 +777,7 @@ class Stylesheet while (st.hasMoreTokens()) { NameTest element = parseNameTest(st.nextToken()); - stripSpace.add(new StrippingInstruction(element, + stripSpace.add(new StrippingInstruction(element, precedence)); } } @@ -923,7 +923,7 @@ class Stylesheet tokens.add(value.substring(off)); types.add(Boolean.FALSE); } - + // Construct template node tree TemplateNode ret = null; Document doc = source.getOwnerDocument(); @@ -983,7 +983,7 @@ class Stylesheet { // Conflict resolution StrippingInstruction ssi = null, psi = null; - for (StrippingInstruction si : stripSpace) + for (StrippingInstruction si : stripSpace) { if (si.element.matches(ctx, 1, 1)) { @@ -998,7 +998,7 @@ class Stylesheet ssi = si; } } - for (StrippingInstruction si : preserveSpace) + for (StrippingInstruction si : preserveSpace) { if (si.element.matches(ctx, 1, 1)) { @@ -1090,7 +1090,7 @@ class Stylesheet } return null; } - + // -- Parsing -- /** @@ -1126,7 +1126,7 @@ class Stylesheet List<WithParam> withParams = parseWithParams(children); return new CallTemplateNode(name, withParams); } - + /** * value-of */ @@ -1140,7 +1140,7 @@ class Stylesheet Expr select = (Expr) xpath.compile(s); return new ValueOfNode(select, d); } - + /** * for-each */ @@ -1156,7 +1156,7 @@ class Stylesheet ret.children = parse(children); return ret; } - + /** * if */ @@ -1171,7 +1171,7 @@ class Stylesheet ret.children = parse(children); return ret; } - + /** * when */ @@ -1186,7 +1186,7 @@ class Stylesheet ret.children = parse(children); return ret; } - + /** * element */ @@ -1223,7 +1223,7 @@ class Stylesheet ret.children = parse(children); return ret; } - + /** * text */ @@ -1238,7 +1238,7 @@ class Stylesheet ret.children = parse(children); return ret; } - + /** * copy */ @@ -1252,7 +1252,7 @@ class Stylesheet ret.children = parse(children); return ret; } - + /** * processing-instruction */ @@ -1266,7 +1266,7 @@ class Stylesheet ret.children = parse(children); return ret; } - + /** * number */ @@ -1340,7 +1340,7 @@ class Stylesheet ret.children = parse(children); return ret; } - + /** * copy-of */ @@ -1355,7 +1355,7 @@ class Stylesheet ret.children = parse(children); return ret; } - + /** * message */ @@ -1370,7 +1370,7 @@ class Stylesheet ret.children = parse(children); return ret; } - + /** * Parse template-level elements. */ @@ -1461,7 +1461,7 @@ class Stylesheet NamedNodeMap attrs = node.getAttributes(); Node children = node.getFirstChild(); TemplateNode content = parse(children); - QName paramName = + QName paramName = getQName(getRequiredAttribute(attrs, "name", node)); String select = getAttribute(attrs, "select"); ParameterNode ret; @@ -1770,4 +1770,3 @@ class Stylesheet } } - diff --git a/libjava/classpath/gnu/xml/transform/SystemPropertyFunction.java b/libjava/classpath/gnu/xml/transform/SystemPropertyFunction.java index 038df01..f314227 100644 --- a/libjava/classpath/gnu/xml/transform/SystemPropertyFunction.java +++ b/libjava/classpath/gnu/xml/transform/SystemPropertyFunction.java @@ -1,4 +1,4 @@ -/* SystemPropertyFunction.java -- +/* SystemPropertyFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -138,4 +138,3 @@ final class SystemPropertyFunction } } - diff --git a/libjava/classpath/gnu/xml/transform/Template.java b/libjava/classpath/gnu/xml/transform/Template.java index 7ddef0a..09d1a99 100644 --- a/libjava/classpath/gnu/xml/transform/Template.java +++ b/libjava/classpath/gnu/xml/transform/Template.java @@ -1,4 +1,4 @@ -/* Template.java -- +/* Template.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,7 +70,7 @@ class Template final QName mode; final boolean isAnyNode; // is the match simply "node()"? - Template(Stylesheet stylesheet, + Template(Stylesheet stylesheet, QName name, Pattern match, TemplateNode node, int precedence, String priorityAttr, QName mode) { @@ -80,7 +80,7 @@ class Template this.node = node; this.precedence = precedence; this.mode = mode; - + double p = DEFAULT_PRIORITY; boolean a = false; if (priorityAttr != null) @@ -126,8 +126,8 @@ class Template this.priority = p; this.isAnyNode = a; } - - private Template(Stylesheet stylesheet, + + private Template(Stylesheet stylesheet, QName name, Pattern match, TemplateNode node, int precedence, double priority, QName mode, boolean isAnyNode) { @@ -155,7 +155,7 @@ class Template mode, isAnyNode); } - + public int compareTo(Object other) { if (other instanceof Template) @@ -249,7 +249,7 @@ class Template buf.append(node); buf.append(']'); return buf.toString(); - + //return (name != null) ? name.toString() : match.toString(); } diff --git a/libjava/classpath/gnu/xml/transform/TemplateNode.java b/libjava/classpath/gnu/xml/transform/TemplateNode.java index ad80c59..d4c223e 100644 --- a/libjava/classpath/gnu/xml/transform/TemplateNode.java +++ b/libjava/classpath/gnu/xml/transform/TemplateNode.java @@ -1,4 +1,4 @@ -/* TemplateNode.java -- +/* TemplateNode.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/transform/TemplatesImpl.java b/libjava/classpath/gnu/xml/transform/TemplatesImpl.java index e5395f6..fc741bc 100644 --- a/libjava/classpath/gnu/xml/transform/TemplatesImpl.java +++ b/libjava/classpath/gnu/xml/transform/TemplatesImpl.java @@ -1,4 +1,4 @@ -/* TemplatesImpl.java -- +/* TemplatesImpl.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/transform/TextNode.java b/libjava/classpath/gnu/xml/transform/TextNode.java index 93d1d54..8263ef5 100644 --- a/libjava/classpath/gnu/xml/transform/TextNode.java +++ b/libjava/classpath/gnu/xml/transform/TextNode.java @@ -1,4 +1,4 @@ -/* TextNode.java -- +/* TextNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -117,5 +117,5 @@ final class TextNode } return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/TransformerFactoryImpl.java b/libjava/classpath/gnu/xml/transform/TransformerFactoryImpl.java index 1e8fea3..972e8a2 100644 --- a/libjava/classpath/gnu/xml/transform/TransformerFactoryImpl.java +++ b/libjava/classpath/gnu/xml/transform/TransformerFactoryImpl.java @@ -1,4 +1,4 @@ -/* TransformerFactoryImpl.java -- +/* TransformerFactoryImpl.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -148,7 +148,7 @@ public class TransformerFactoryImpl } return new Stylesheet(this, parent, doc, systemId, precedence); } - + public Source getAssociatedStylesheet(Source source, String media, String title, @@ -365,14 +365,14 @@ public class TransformerFactoryImpl Transformer transformer = newTransformer(); return new SAXTransformerHandler(this, transformer); } - + public TransformerHandler newTransformerHandler(Source source) throws TransformerConfigurationException { Transformer transformer = newTransformer(source); return new SAXTransformerHandler(this, transformer); } - + public TransformerHandler newTransformerHandler(Templates templates) throws TransformerConfigurationException { @@ -391,7 +391,7 @@ public class TransformerFactoryImpl { throw new UnsupportedOperationException(); } - + // -- SAXTransformerFactory end -- /** @@ -434,5 +434,5 @@ public class TransformerFactoryImpl out.close(); } } - + } diff --git a/libjava/classpath/gnu/xml/transform/TransformerImpl.java b/libjava/classpath/gnu/xml/transform/TransformerImpl.java index a975c69..eb6a5de 100644 --- a/libjava/classpath/gnu/xml/transform/TransformerImpl.java +++ b/libjava/classpath/gnu/xml/transform/TransformerImpl.java @@ -1,4 +1,4 @@ -/* TransformerImpl.java -- +/* TransformerImpl.java -- Copyright (C) 2004,2005,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -231,9 +231,9 @@ class TransformerImpl String publicId = outputProperties.getProperty(OutputKeys.DOCTYPE_PUBLIC); String systemId = outputProperties.getProperty(OutputKeys.DOCTYPE_SYSTEM); String version = outputProperties.getProperty(OutputKeys.VERSION); - boolean omitXmlDeclaration = + boolean omitXmlDeclaration = "yes".equals(outputProperties.getProperty(OutputKeys.OMIT_XML_DECLARATION)); - boolean standalone = + boolean standalone = "yes".equals(outputProperties.getProperty(OutputKeys.STANDALONE)); String mediaType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE); String cdataSectionElements = diff --git a/libjava/classpath/gnu/xml/transform/TransformerOutputProperties.java b/libjava/classpath/gnu/xml/transform/TransformerOutputProperties.java index 9ac5cdc..ddaa260 100644 --- a/libjava/classpath/gnu/xml/transform/TransformerOutputProperties.java +++ b/libjava/classpath/gnu/xml/transform/TransformerOutputProperties.java @@ -1,4 +1,4 @@ -/* TransformerOutputProperties.java -- +/* TransformerOutputProperties.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,7 +54,7 @@ import javax.xml.transform.OutputKeys; class TransformerOutputProperties extends Properties { - + final Properties defaultProperties; final Stylesheet stylesheet; boolean dirty; @@ -170,7 +170,7 @@ class TransformerOutputProperties "yes".equals(getProperty(OutputKeys.STANDALONE)); stylesheet.outputPublicId = getProperty(OutputKeys.DOCTYPE_PUBLIC); stylesheet.outputSystemId = getProperty(OutputKeys.DOCTYPE_SYSTEM); - StringTokenizer st = + StringTokenizer st = new StringTokenizer(getProperty(OutputKeys.CDATA_SECTION_ELEMENTS)); Collection acc = new LinkedHashSet(); while (st.hasMoreTokens()) @@ -184,4 +184,3 @@ class TransformerOutputProperties } } - diff --git a/libjava/classpath/gnu/xml/transform/URIResolverEntityResolver.java b/libjava/classpath/gnu/xml/transform/URIResolverEntityResolver.java index 762416f..49193a4 100644 --- a/libjava/classpath/gnu/xml/transform/URIResolverEntityResolver.java +++ b/libjava/classpath/gnu/xml/transform/URIResolverEntityResolver.java @@ -1,4 +1,4 @@ -/* URIResolverEntityResolver.java -- +/* URIResolverEntityResolver.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -79,5 +79,5 @@ class URIResolverEntityResolver throw new SAXException(e); } } - + } diff --git a/libjava/classpath/gnu/xml/transform/UnparsedEntityUriFunction.java b/libjava/classpath/gnu/xml/transform/UnparsedEntityUriFunction.java index 7ba0eae..5eae78c 100644 --- a/libjava/classpath/gnu/xml/transform/UnparsedEntityUriFunction.java +++ b/libjava/classpath/gnu/xml/transform/UnparsedEntityUriFunction.java @@ -1,4 +1,4 @@ -/* UnparsedEntityUriFunction.java -- +/* UnparsedEntityUriFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -130,4 +130,3 @@ final class UnparsedEntityUriFunction } } - diff --git a/libjava/classpath/gnu/xml/transform/ValueOfNode.java b/libjava/classpath/gnu/xml/transform/ValueOfNode.java index 156affa..0d9a656 100644 --- a/libjava/classpath/gnu/xml/transform/ValueOfNode.java +++ b/libjava/classpath/gnu/xml/transform/ValueOfNode.java @@ -1,4 +1,4 @@ -/* ValueOfNode.java -- +/* ValueOfNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -76,7 +76,7 @@ final class ValueOfNode ret.next = next.clone(stylesheet); return ret; } - + @Override void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, @@ -125,7 +125,7 @@ final class ValueOfNode return true; return super.references(var); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder("value-of"); @@ -137,5 +137,5 @@ final class ValueOfNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/WhenNode.java b/libjava/classpath/gnu/xml/transform/WhenNode.java index fc9d5b1..abfe796 100644 --- a/libjava/classpath/gnu/xml/transform/WhenNode.java +++ b/libjava/classpath/gnu/xml/transform/WhenNode.java @@ -1,4 +1,4 @@ -/* WhenNode.java -- +/* WhenNode.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,14 +94,14 @@ final class WhenNode parent, nextSibling); } } - + public boolean references(QName var) { if (test != null && test.references(var)) return true; return super.references(var); } - + public String toString() { CPStringBuilder buf = new CPStringBuilder("when"); @@ -111,5 +111,5 @@ final class WhenNode buf.append(']'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/transform/WithParam.java b/libjava/classpath/gnu/xml/transform/WithParam.java index bcfe1e9..2e726fb 100644 --- a/libjava/classpath/gnu/xml/transform/WithParam.java +++ b/libjava/classpath/gnu/xml/transform/WithParam.java @@ -1,4 +1,4 @@ -/* WithParam.java -- +/* WithParam.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/transform/XSLComparator.java b/libjava/classpath/gnu/xml/transform/XSLComparator.java index 8824369..1fd0b20 100644 --- a/libjava/classpath/gnu/xml/transform/XSLComparator.java +++ b/libjava/classpath/gnu/xml/transform/XSLComparator.java @@ -1,4 +1,4 @@ -/* XSLComparator.java -- +/* XSLComparator.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -65,54 +65,54 @@ class XSLComparator { for (SortKey sortKey : sortKeys) { - String k1 = sortKey.key(n1); - String k2 = sortKey.key(n2); - if ("text".equals(sortKey.dataType)) - { - Locale locale = (sortKey.lang == null) ? Locale.getDefault() : - new Locale(sortKey.lang); - Collator collator = Collator.getInstance(locale); - int d = collator.compare(k1, k2); - if (d != 0) - { - switch (sortKey.caseOrder) - { - case SortKey.UPPER_FIRST: - // TODO - break; - case SortKey.LOWER_FIRST: - // TODO - break; - } - if (sortKey.descending) - { - d = -d; - } - return d; - } - } - else if ("number".equals(sortKey.dataType)) - { - double kn1 = Expr._number(n1, k1); - double kn2 = Expr._number(n2, k2); - int d; - if (Double.isNaN(kn1) || Double.isInfinite(kn2)) - { - d = -1; - } - else if (Double.isNaN(kn2) || Double.isInfinite(kn1)) - { - d = 1; - } - else - { - // conversion to int may give 0 for small numbers - d = (kn1 > kn2) ? 1 : (kn1 < kn2) ? -1 : 0; - } - return (sortKey.descending) ? -d : d; - } + String k1 = sortKey.key(n1); + String k2 = sortKey.key(n2); + if ("text".equals(sortKey.dataType)) + { + Locale locale = (sortKey.lang == null) ? Locale.getDefault() : + new Locale(sortKey.lang); + Collator collator = Collator.getInstance(locale); + int d = collator.compare(k1, k2); + if (d != 0) + { + switch (sortKey.caseOrder) + { + case SortKey.UPPER_FIRST: + // TODO + break; + case SortKey.LOWER_FIRST: + // TODO + break; + } + if (sortKey.descending) + { + d = -d; + } + return d; + } + } + else if ("number".equals(sortKey.dataType)) + { + double kn1 = Expr._number(n1, k1); + double kn2 = Expr._number(n2, k2); + int d; + if (Double.isNaN(kn1) || Double.isInfinite(kn2)) + { + d = -1; + } + else if (Double.isNaN(kn2) || Double.isInfinite(kn1)) + { + d = 1; + } + else + { + // conversion to int may give 0 for small numbers + d = (kn1 > kn2) ? 1 : (kn1 < kn2) ? -1 : 0; + } + return (sortKey.descending) ? -d : d; + } } return 0; } - + } diff --git a/libjava/classpath/gnu/xml/transform/XSLURIResolver.java b/libjava/classpath/gnu/xml/transform/XSLURIResolver.java index c137921..cf596c1 100644 --- a/libjava/classpath/gnu/xml/transform/XSLURIResolver.java +++ b/libjava/classpath/gnu/xml/transform/XSLURIResolver.java @@ -1,4 +1,4 @@ -/* XSLURIResolver.java -- +/* XSLURIResolver.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -168,7 +168,7 @@ class XSLURIResolver } conn.connect(); lastModified = conn.getLastModified(); - if (node != null && + if (node != null && lastModified > 0L && lastModified <= lastLastModified) { @@ -266,7 +266,7 @@ class XSLURIResolver return (file == null) ? null : file.toURL(); } } - + DocumentBuilder getDocumentBuilder() throws TransformerException { @@ -317,6 +317,5 @@ class XSLURIResolver ((DomDocument) doc).setDocumentURI(systemId); return new DOMSource(doc, systemId); } - -} +} diff --git a/libjava/classpath/gnu/xml/util/DoParse.java b/libjava/classpath/gnu/xml/util/DoParse.java index a8f5096..02c80d3 100644 --- a/libjava/classpath/gnu/xml/util/DoParse.java +++ b/libjava/classpath/gnu/xml/util/DoParse.java @@ -1,4 +1,4 @@ -/* DoParse.java -- +/* DoParse.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -101,11 +101,11 @@ final public class DoParse private DoParse () { /* no instances allowed */ } // first reported nonrecoverable error - private static SAXParseException fatal; + private static SAXParseException fatal; // error categories - private static int errorCount; - private static int fatalCount; + private static int errorCount; + private static int fatalCount; /** * Command line invoker for this class; pass a filename or URL @@ -121,182 +121,182 @@ final public class DoParse public static void main (String argv []) throws IOException { - int exitStatus = 1; - - if (argv.length != 2) { - System.err.println ("Usage: DoParse [filename|URL] pipeline-spec"); - System.err.println ("Example pipeline specs:"); - System.err.println (" 'nsfix | validate'"); - System.err.println ( - " ... restore namespace syntax, validate"); - System.err.println (" 'nsfix | write ( stdout )'"); - System.err.println ( - " ... restore namespace syntax, write to stdout as XML" - ); - System.exit (1); - } - - try { - // - // Get input source for specified document (or try ;-) - // - argv [0] = Resolver.getURL (argv [0]); - InputSource input = new InputSource (argv [0]); - - // - // Get the producer, using the system default parser (which - // can be overridden for this particular invocation). - // - // And the pipeline, using commandline options. - // - XMLReader producer; - EventConsumer consumer; - - producer = XMLReaderFactory.createXMLReader (); - - // - // XXX pipeline factory now has a pre-tokenized input - // method, use it ... that way at least some params - // can be written using quotes (have spaces, ...) - // - consumer = PipelineFactory.createPipeline (argv [1]); - - // - // XXX want commandline option for tweaking error handler. - // Want to be able to present warnings. - // - producer.setErrorHandler (new MyErrorHandler ()); - - // XXX need facility enabling resolving to local DTDs - - // - // Parse. The pipeline may get optimized a bit, so we - // can't always fail cleanly for validation without taking - // a look at the filter stages. - // - EventFilter.bind (producer, consumer); - producer.parse (input); - - try { - if (producer.getFeature ( - "http://org.xml/sax/features/validation")) - exitStatus = ((errorCount + fatalCount) > 0) ? 1 : 0; - else if (fatalCount == 0) - exitStatus = 0; - } catch (SAXException e) { - if (hasValidator (consumer)) - exitStatus = ((errorCount + fatalCount) > 0) ? 1 : 0; - else if (fatalCount == 0) - exitStatus = 0; - } - - } catch (java.net.MalformedURLException e) { - System.err.println ("** Malformed URL: " + e.getMessage ()); - System.err.println ("Is '" + argv [0] + "' a non-existent file?"); - e.printStackTrace (); - // e.g. FNF - - } catch (SAXParseException e) { - if (e != fatal) { - System.err.print (printParseException ("Parsing Aborted", e)); - e.printStackTrace (); - if (e.getException () != null) { - System.err.println ("++ Wrapped exception:"); - e.getException ().printStackTrace (); - } - } - - } catch (SAXException e) { - Exception x = e; - if (e.getException () != null) - x = e.getException (); - x.printStackTrace (); - - } catch (Throwable t) { - t.printStackTrace (); - } - - System.exit (exitStatus); + int exitStatus = 1; + + if (argv.length != 2) { + System.err.println ("Usage: DoParse [filename|URL] pipeline-spec"); + System.err.println ("Example pipeline specs:"); + System.err.println (" 'nsfix | validate'"); + System.err.println ( + " ... restore namespace syntax, validate"); + System.err.println (" 'nsfix | write ( stdout )'"); + System.err.println ( + " ... restore namespace syntax, write to stdout as XML" + ); + System.exit (1); + } + + try { + // + // Get input source for specified document (or try ;-) + // + argv [0] = Resolver.getURL (argv [0]); + InputSource input = new InputSource (argv [0]); + + // + // Get the producer, using the system default parser (which + // can be overridden for this particular invocation). + // + // And the pipeline, using commandline options. + // + XMLReader producer; + EventConsumer consumer; + + producer = XMLReaderFactory.createXMLReader (); + + // + // XXX pipeline factory now has a pre-tokenized input + // method, use it ... that way at least some params + // can be written using quotes (have spaces, ...) + // + consumer = PipelineFactory.createPipeline (argv [1]); + + // + // XXX want commandline option for tweaking error handler. + // Want to be able to present warnings. + // + producer.setErrorHandler (new MyErrorHandler ()); + + // XXX need facility enabling resolving to local DTDs + + // + // Parse. The pipeline may get optimized a bit, so we + // can't always fail cleanly for validation without taking + // a look at the filter stages. + // + EventFilter.bind (producer, consumer); + producer.parse (input); + + try { + if (producer.getFeature ( + "http://org.xml/sax/features/validation")) + exitStatus = ((errorCount + fatalCount) > 0) ? 1 : 0; + else if (fatalCount == 0) + exitStatus = 0; + } catch (SAXException e) { + if (hasValidator (consumer)) + exitStatus = ((errorCount + fatalCount) > 0) ? 1 : 0; + else if (fatalCount == 0) + exitStatus = 0; + } + + } catch (java.net.MalformedURLException e) { + System.err.println ("** Malformed URL: " + e.getMessage ()); + System.err.println ("Is '" + argv [0] + "' a non-existent file?"); + e.printStackTrace (); + // e.g. FNF + + } catch (SAXParseException e) { + if (e != fatal) { + System.err.print (printParseException ("Parsing Aborted", e)); + e.printStackTrace (); + if (e.getException () != null) { + System.err.println ("++ Wrapped exception:"); + e.getException ().printStackTrace (); + } + } + + } catch (SAXException e) { + Exception x = e; + if (e.getException () != null) + x = e.getException (); + x.printStackTrace (); + + } catch (Throwable t) { + t.printStackTrace (); + } + + System.exit (exitStatus); } // returns true if saw a validator (before end or unrecognized node) // false otherwise private static boolean hasValidator (EventConsumer e) { - if (e == null) - return false; - if (e instanceof ValidationConsumer) - return true; - if (e instanceof TeeConsumer) { - TeeConsumer t = (TeeConsumer) e; - return hasValidator (t.getFirst ()) - || hasValidator (t.getRest ()); - } - if (e instanceof WellFormednessFilter - || e instanceof NSFilter - ) - return hasValidator (((EventFilter)e).getNext ()); - - // else ... gee, we can't know. Assume not. - - return false; + if (e == null) + return false; + if (e instanceof ValidationConsumer) + return true; + if (e instanceof TeeConsumer) { + TeeConsumer t = (TeeConsumer) e; + return hasValidator (t.getFirst ()) + || hasValidator (t.getRest ()); + } + if (e instanceof WellFormednessFilter + || e instanceof NSFilter + ) + return hasValidator (((EventFilter)e).getNext ()); + + // else ... gee, we can't know. Assume not. + + return false; } static class MyErrorHandler implements ErrorHandler { - // dump validation errors, but continue - public void error (SAXParseException e) - throws SAXParseException - { - errorCount++; - System.err.print (printParseException ("Error", e)); - } - - public void warning (SAXParseException e) - throws SAXParseException - { - // System.err.print (printParseException ("Warning", e)); - } - - // try to continue fatal errors, in case a parser reports more - public void fatalError (SAXParseException e) - throws SAXParseException - { - fatalCount++; - if (fatal == null) - fatal = e; - System.err.print (printParseException ("Nonrecoverable Error", e)); - } + // dump validation errors, but continue + public void error (SAXParseException e) + throws SAXParseException + { + errorCount++; + System.err.print (printParseException ("Error", e)); + } + + public void warning (SAXParseException e) + throws SAXParseException + { + // System.err.print (printParseException ("Warning", e)); + } + + // try to continue fatal errors, in case a parser reports more + public void fatalError (SAXParseException e) + throws SAXParseException + { + fatalCount++; + if (fatal == null) + fatal = e; + System.err.print (printParseException ("Nonrecoverable Error", e)); + } } static private String printParseException ( - String label, - SAXParseException e + String label, + SAXParseException e ) { - CPStringBuilder buf = new CPStringBuilder (); - int temp; - - buf.append ("** "); - buf.append (label); - buf.append (": "); - buf.append (e.getMessage ()); - buf.append ('\n'); - if (e.getSystemId () != null) { - buf.append (" URI: "); - buf.append (e.getSystemId ()); - buf.append ('\n'); - } - if ((temp = e.getLineNumber ()) != -1) { - buf.append (" line: "); - buf.append (temp); - buf.append ('\n'); - } - if ((temp = e.getColumnNumber ()) != -1) { - buf.append (" char: "); - buf.append (temp); - buf.append ('\n'); - } - - return buf.toString (); + CPStringBuilder buf = new CPStringBuilder (); + int temp; + + buf.append ("** "); + buf.append (label); + buf.append (": "); + buf.append (e.getMessage ()); + buf.append ('\n'); + if (e.getSystemId () != null) { + buf.append (" URI: "); + buf.append (e.getSystemId ()); + buf.append ('\n'); + } + if ((temp = e.getLineNumber ()) != -1) { + buf.append (" line: "); + buf.append (temp); + buf.append ('\n'); + } + if ((temp = e.getColumnNumber ()) != -1) { + buf.append (" char: "); + buf.append (temp); + buf.append ('\n'); + } + + return buf.toString (); } } diff --git a/libjava/classpath/gnu/xml/util/DomParser.java b/libjava/classpath/gnu/xml/util/DomParser.java index b28b610..66e3f1d 100644 --- a/libjava/classpath/gnu/xml/util/DomParser.java +++ b/libjava/classpath/gnu/xml/util/DomParser.java @@ -1,4 +1,4 @@ -/* DomParser.java -- +/* DomParser.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,50 +60,50 @@ import org.w3c.dom.*; * * <table border="1" width='100%' cellpadding='3' cellspacing='0'> * <tr bgcolor='#ccccff'> - * <th><font size='+1'>Name</font></th> - * <th><font size='+1'>Notes</font></th></tr> + * <th><font size='+1'>Name</font></th> + * <th><font size='+1'>Notes</font></th></tr> * * <tr><td colspan=2><center><em>Features ... URL prefix is * <b>http://xml.org/sax/features/</b></em></center></td></tr> * * <tr><td>(URL)/external-general-entities</td> - * <td>false (does no parsing)</td></tr> + * <td>false (does no parsing)</td></tr> * <tr><td>(URL)/external-parameter-entities</td> - * <td>false (does no parsing)</td></tr> + * <td>false (does no parsing)</td></tr> * <tr><td>(URL)/namespaces</td> - * <td>Value is fixed at <em>true</em></td></tr> + * <td>Value is fixed at <em>true</em></td></tr> * <tr><td>(URL)/namespace-prefixes</td> - * <td>Value is settable, defaulting to <em>false</em> - * (<code>xmlns</code> attributes hidden, and names aren't prefixed) - * </td></tr> + * <td>Value is settable, defaulting to <em>false</em> + * (<code>xmlns</code> attributes hidden, and names aren't prefixed) + * </td></tr> * <tr><td>(URL)/string-interning</td> - * <td>Value is fixed at <em>false</em> (DOM provides no - * guarantees as to interning)</td></tr> + * <td>Value is fixed at <em>false</em> (DOM provides no + * guarantees as to interning)</td></tr> * <tr><td>(URL)/validation</td> - * <td>false (does no parsing)</td></tr> + * <td>false (does no parsing)</td></tr> * <tr><td>(URL)/lexical-handler/parameter-entities</td> - * <td>false (DOM doesn't do parameter entities)</td></tr> + * <td>false (DOM doesn't do parameter entities)</td></tr> * * <tr><td colspan=2><center><em>Properties ... URL prefix is * <b>http://xml.org/sax/properties/</b></em></center></td></tr> * * * <tr><td>(URL)/dom-node</td> - * <td>This property may be set before parsing to hold a DOM - * <em>Document</em> node; any arguments given to <em>parse</em> - * methods are ignored. When retrieved - * during a parse, this value contains the "current" DOM node. - * </td></tr> + * <td>This property may be set before parsing to hold a DOM + * <em>Document</em> node; any arguments given to <em>parse</em> + * methods are ignored. When retrieved + * during a parse, this value contains the "current" DOM node. + * </td></tr> * <tr><td>(URL)/declaration-handler</td> - * <td>A declaration handler may be provided. Declaration of external - * general entities is exposed, but not parameter entities; none of the - * entity names reported here will begin with "%". </td></tr> + * <td>A declaration handler may be provided. Declaration of external + * general entities is exposed, but not parameter entities; none of the + * entity names reported here will begin with "%". </td></tr> * <tr><td>(URL)/lexical-handler</td> - * <td>A lexical handler may be provided. While the start and end of - * any external subset are reported, expansion of other parameter - * entities (e.g. inside attribute list declarations) is not exposed. - * Expansion of general entities within attributes is also not exposed - * (see below).</td></tr> + * <td>A lexical handler may be provided. While the start and end of + * any external subset are reported, expansion of other parameter + * entities (e.g. inside attribute list declarations) is not exposed. + * Expansion of general entities within attributes is also not exposed + * (see below).</td></tr> * </table> * * <P> The consequences of modifying a DOM document tree as it is being walked @@ -114,34 +114,34 @@ import org.w3c.dom.*; final public class DomParser implements XMLReader { // Stuff used internally to route events correctly - private DefaultHandler2 defaultHandler = new DefaultHandler2 (); + private DefaultHandler2 defaultHandler = new DefaultHandler2 (); // per-parse SAX stuff - private ContentHandler contentHandler = defaultHandler; - private DTDHandler dtdHandler = defaultHandler; - private DeclHandler declHandler = defaultHandler; - private LexicalHandler lexicalHandler = defaultHandler; + private ContentHandler contentHandler = defaultHandler; + private DTDHandler dtdHandler = defaultHandler; + private DeclHandler declHandler = defaultHandler; + private LexicalHandler lexicalHandler = defaultHandler; // shared context - private ErrorHandler errHandler = defaultHandler; - private EntityResolver resolver = defaultHandler; - private Locale locale = Locale.getDefault (); + private ErrorHandler errHandler = defaultHandler; + private EntityResolver resolver = defaultHandler; + private Locale locale = Locale.getDefault (); // parser state - private Node start; - private Node current; - private boolean isL2; - private boolean showNamespaces = true; - private boolean showXML1_0 = false; - private NamespaceSupport prefixStack = new NamespaceSupport (); - private boolean isDocument; + private Node start; + private Node current; + private boolean isL2; + private boolean showNamespaces = true; + private boolean showXML1_0 = false; + private NamespaceSupport prefixStack = new NamespaceSupport (); + private boolean isDocument; /** * Constructs an unitialized <b>SAX2</b> parser. */ public DomParser () { - } + } /** * Constructs an <b>SAX2</b> parser initialized to traverse the specified @@ -149,8 +149,8 @@ final public class DomParser implements XMLReader * endDocument() calls bracket the calls exposing children. */ public DomParser (Node node) { - setStart (node); - } + setStart (node); + } // stuff that most components in an application should be sharing: @@ -162,7 +162,7 @@ final public class DomParser implements XMLReader */ public EntityResolver getEntityResolver () { - return resolver; + return resolver; } /** @@ -171,9 +171,9 @@ final public class DomParser implements XMLReader */ public void setEntityResolver (EntityResolver resolver) { - if (resolver == null) - resolver = defaultHandler; - this.resolver = resolver; + if (resolver == null) + resolver = defaultHandler; + this.resolver = resolver; } /** @@ -181,17 +181,17 @@ final public class DomParser implements XMLReader * diagnostics it provides. * * @exception SAXException as defined in the specification for - * <em>org.xml.sax.Parser.setLocale()</em> + * <em>org.xml.sax.Parser.setLocale()</em> */ public void setLocale (Locale locale) throws SAXException { - if (locale == null) - locale = Locale.getDefault (); - this.locale = locale; + if (locale == null) + locale = Locale.getDefault (); + this.locale = locale; } - + // different modules will tend to handle error handling the same, // but it may not be the same through the whole app @@ -201,7 +201,7 @@ final public class DomParser implements XMLReader */ public ErrorHandler getErrorHandler () { - return errHandler; + return errHandler; } /** @@ -210,9 +210,9 @@ final public class DomParser implements XMLReader */ public void setErrorHandler (ErrorHandler handler) { - if (handler == null) - handler = defaultHandler; - errHandler = handler; + if (handler == null) + handler = defaultHandler; + errHandler = handler; } @@ -224,7 +224,7 @@ final public class DomParser implements XMLReader */ public ContentHandler getContentHandler () { - return contentHandler; + return contentHandler; } /** @@ -233,9 +233,9 @@ final public class DomParser implements XMLReader */ public void setContentHandler (ContentHandler handler) { - if (handler == null) - handler = defaultHandler; - contentHandler = handler; + if (handler == null) + handler = defaultHandler; + contentHandler = handler; } /** @@ -244,7 +244,7 @@ final public class DomParser implements XMLReader */ public DTDHandler getDTDHandler () { - return dtdHandler; + return dtdHandler; } /** @@ -253,9 +253,9 @@ final public class DomParser implements XMLReader */ public void setDTDHandler (DTDHandler handler) { - if (handler == null) - handler = defaultHandler; - dtdHandler = handler; + if (handler == null) + handler = defaultHandler; + dtdHandler = handler; } @@ -266,11 +266,11 @@ final public class DomParser implements XMLReader * * @param uri ignored (pass an empty string) * @exception SAXException as defined in the specification for - * <em>org.xml.sax.Parser.parse()</em> + * <em>org.xml.sax.Parser.parse()</em> */ public void parse (String uri) throws SAXException { - parse (); + parse (); } /** @@ -280,38 +280,38 @@ final public class DomParser implements XMLReader * * @param input ignored * @exception SAXException as defined in the specification for - * <em>org.xml.sax.Parser.parse()</em> + * <em>org.xml.sax.Parser.parse()</em> */ public void parse (InputSource input) throws SAXException { - parse (); + parse (); } private void parse () throws SAXException { - try { - walk (); - } finally { - if (isDocument) - contentHandler.endDocument (); - current = null; - prefixStack.reset (); - } + try { + walk (); + } finally { + if (isDocument) + contentHandler.endDocument (); + current = null; + prefixStack.reset (); + } } private boolean getIsL2 (Node node) { - DOMImplementation impl; - Document doc; - - if (node instanceof Document) - doc = (Document) node; - else - doc = node.getOwnerDocument (); - if (doc == null) - throw new RuntimeException ("? unowned node - L2 DTD ?"); - impl = doc.getImplementation (); - return impl.hasFeature ("XML", "2.0"); + DOMImplementation impl; + Document doc; + + if (node instanceof Document) + doc = (Document) node; + else + doc = node.getOwnerDocument (); + if (doc == null) + throw new RuntimeException ("? unowned node - L2 DTD ?"); + impl = doc.getImplementation (); + return impl.hasFeature ("XML", "2.0"); } @@ -324,26 +324,26 @@ final public class DomParser implements XMLReader public boolean getFeature (String name) throws SAXNotRecognizedException, SAXNotSupportedException { - // basically, none are relevant -- they relate more to - // parsing than to walking a "parse tree". - - // FIXME: DOM feature to expose interning? - - if ((FEATURES + "validation").equals (name) - || (FEATURES + "external-general-entities") - .equals (name) - || (FEATURES + "external-parameter-entities") - .equals (name) - || (FEATURES + "string-interning").equals (name) - ) - return false; - - if ((FEATURES + "namespaces").equals (name)) - return showNamespaces; - if ((FEATURES + "namespace-prefixes").equals (name)) - return showXML1_0; - - throw new SAXNotRecognizedException (name); + // basically, none are relevant -- they relate more to + // parsing than to walking a "parse tree". + + // FIXME: DOM feature to expose interning? + + if ((FEATURES + "validation").equals (name) + || (FEATURES + "external-general-entities") + .equals (name) + || (FEATURES + "external-parameter-entities") + .equals (name) + || (FEATURES + "string-interning").equals (name) + ) + return false; + + if ((FEATURES + "namespaces").equals (name)) + return showNamespaces; + if ((FEATURES + "namespace-prefixes").equals (name)) + return showXML1_0; + + throw new SAXNotRecognizedException (name); } /** @@ -354,16 +354,16 @@ final public class DomParser implements XMLReader public Object getProperty (String name) throws SAXNotRecognizedException, SAXNotSupportedException { - if ((HANDLERS + "declaration-handler").equals (name)) - return declHandler == defaultHandler ? null : declHandler; - if ((HANDLERS + "lexical-handler").equals (name)) - return lexicalHandler == defaultHandler ? null : lexicalHandler; + if ((HANDLERS + "declaration-handler").equals (name)) + return declHandler == defaultHandler ? null : declHandler; + if ((HANDLERS + "lexical-handler").equals (name)) + return lexicalHandler == defaultHandler ? null : lexicalHandler; - if ((HANDLERS + "dom-node").equals (name)) - return current; + if ((HANDLERS + "dom-node").equals (name)) + return current; - // unknown properties - throw new SAXNotRecognizedException (name); + // unknown properties + throw new SAXNotRecognizedException (name); } /** @@ -373,30 +373,30 @@ final public class DomParser implements XMLReader public void setFeature (String name, boolean state) throws SAXNotRecognizedException, SAXNotSupportedException { - if (current != null) - throw new IllegalStateException ("feature change midparse"); - - boolean value = getFeature (name); - - if (value == state) - return; - - if ((FEATURES + "namespaces").equals (name)) { - if (!showXML1_0 && state == false) - throw new SAXNotSupportedException ("Illegal namespace " - + "processing configuration"); - showNamespaces = state; - return; - } - if ((FEATURES + "namespace-prefixes").equals (name)) { - if (!showNamespaces && state == false) - throw new SAXNotSupportedException ("Illegal namespace " - + "processing configuration"); - showXML1_0 = state; - return; - } - - throw new SAXNotSupportedException (name); + if (current != null) + throw new IllegalStateException ("feature change midparse"); + + boolean value = getFeature (name); + + if (value == state) + return; + + if ((FEATURES + "namespaces").equals (name)) { + if (!showXML1_0 && state == false) + throw new SAXNotSupportedException ("Illegal namespace " + + "processing configuration"); + showNamespaces = state; + return; + } + if ((FEATURES + "namespace-prefixes").equals (name)) { + if (!showNamespaces && state == false) + throw new SAXNotSupportedException ("Illegal namespace " + + "processing configuration"); + showXML1_0 = state; + return; + } + + throw new SAXNotSupportedException (name); } /** @@ -410,42 +410,42 @@ final public class DomParser implements XMLReader public void setProperty (String name, Object state) throws SAXNotRecognizedException, SAXNotSupportedException { - if ((HANDLERS + "declaration-handler").equals (name)) { - if (!(state instanceof DeclHandler || state == null)) - throw new SAXNotSupportedException (name); - declHandler = (DeclHandler) state; - return; - } - - if ((HANDLERS + "lexical-handler").equals (name)) { - if (!(state instanceof LexicalHandler || state == null)) - throw new SAXNotSupportedException (name); - lexicalHandler = (LexicalHandler) state; - return; - } - - if ((HANDLERS + "dom-node").equals (name)) { - if (state == null || state instanceof Node) { - if (current != null) - throw new SAXNotSupportedException ( - "property is readonly during parse: " + name); - setStart ((Node) state); - return; - } - throw new SAXNotSupportedException ("not a DOM Node"); - } - - // unknown properties - throw new SAXNotRecognizedException (name); + if ((HANDLERS + "declaration-handler").equals (name)) { + if (!(state instanceof DeclHandler || state == null)) + throw new SAXNotSupportedException (name); + declHandler = (DeclHandler) state; + return; + } + + if ((HANDLERS + "lexical-handler").equals (name)) { + if (!(state instanceof LexicalHandler || state == null)) + throw new SAXNotSupportedException (name); + lexicalHandler = (LexicalHandler) state; + return; + } + + if ((HANDLERS + "dom-node").equals (name)) { + if (state == null || state instanceof Node) { + if (current != null) + throw new SAXNotSupportedException ( + "property is readonly during parse: " + name); + setStart ((Node) state); + return; + } + throw new SAXNotSupportedException ("not a DOM Node"); + } + + // unknown properties + throw new SAXNotRecognizedException (name); } private void setStart (Node property) { - start = property; - if (start != null) { - isL2 = getIsL2 (start); - isDocument = (start instanceof Document); - } + start = property; + if (start != null) { + isL2 = getIsL2 (start); + isDocument = (start instanceof Document); + } } // @@ -454,351 +454,351 @@ final public class DomParser implements XMLReader private void walk () throws SAXException { - int type; - NamedNodeMap nodes; - int length; - AttributesImpl attrs = new AttributesImpl (); - char chars []; - String ns, local; - - synchronized (this) { - if (current != null) - throw new IllegalStateException ("already walking tree"); - - // JVM guarantees assignments are atomic; so no other - // thread could get this far till this walk's done. - current = start; - } - - for (;;) { - type = current.getNodeType (); - - // - // First, visit the current node, including any "start" calls - // - switch (type) { - - case Node.DOCUMENT_NODE: - contentHandler.startDocument (); - break; - - case Node.ELEMENT_NODE: - nodes = current.getAttributes (); - length = nodes.getLength (); - prefixStack.pushContext (); - for (int i = 0; i < length; i++) { - Attr attr = (Attr) nodes.item (i); - String name = attr.getNodeName (); - - if (showNamespaces && name.startsWith ("xmlns")) { - String prefix; - String uri; - - // NOTE: DOM L2 (CR2+ and REC) violate the - // Namespaces REC, treat "xmlns" like a strange - // attribute instead of a magic token - if ("xmlns".equals (name)) - prefix = ""; - else - prefix = name.substring (6); - uri = attr.getNodeValue (); - - prefixStack.declarePrefix (prefix, uri); - contentHandler.startPrefixMapping (prefix, uri); - - if (!showXML1_0) - continue; - } - - // - // NOTE: DOM doesn't record the attribute type info - // which SAX exposes; so this always reports CDATA. - // - // NOTE: SAX doesn't expose the isSpecified info which - // DOM exposes; that's discarded here. Similarly with - // the information DOM hides inside itself about what - // the default values for an attribute are. - // - if (showNamespaces) { - if (isL2) { - if ((ns = attr.getNamespaceURI ()) == null) - ns = ""; - // Note: SAX2 and DOM handle "local" names - // differently - if ((local = attr.getLocalName ()) == null) - local = name; - } else { + int type; + NamedNodeMap nodes; + int length; + AttributesImpl attrs = new AttributesImpl (); + char chars []; + String ns, local; + + synchronized (this) { + if (current != null) + throw new IllegalStateException ("already walking tree"); + + // JVM guarantees assignments are atomic; so no other + // thread could get this far till this walk's done. + current = start; + } + + for (;;) { + type = current.getNodeType (); + + // + // First, visit the current node, including any "start" calls + // + switch (type) { + + case Node.DOCUMENT_NODE: + contentHandler.startDocument (); + break; + + case Node.ELEMENT_NODE: + nodes = current.getAttributes (); + length = nodes.getLength (); + prefixStack.pushContext (); + for (int i = 0; i < length; i++) { + Attr attr = (Attr) nodes.item (i); + String name = attr.getNodeName (); + + if (showNamespaces && name.startsWith ("xmlns")) { + String prefix; + String uri; + + // NOTE: DOM L2 (CR2+ and REC) violate the + // Namespaces REC, treat "xmlns" like a strange + // attribute instead of a magic token + if ("xmlns".equals (name)) + prefix = ""; + else + prefix = name.substring (6); + uri = attr.getNodeValue (); + + prefixStack.declarePrefix (prefix, uri); + contentHandler.startPrefixMapping (prefix, uri); + + if (!showXML1_0) + continue; + } + + // + // NOTE: DOM doesn't record the attribute type info + // which SAX exposes; so this always reports CDATA. + // + // NOTE: SAX doesn't expose the isSpecified info which + // DOM exposes; that's discarded here. Similarly with + // the information DOM hides inside itself about what + // the default values for an attribute are. + // + if (showNamespaces) { + if (isL2) { + if ((ns = attr.getNamespaceURI ()) == null) + ns = ""; + // Note: SAX2 and DOM handle "local" names + // differently + if ((local = attr.getLocalName ()) == null) + local = name; + } else { // XXX - throw new RuntimeException ( - "NYI, ns lookup when parsing L1 DOM"); - } - } else - ns = local = ""; - attrs.addAttribute (ns, local, name, - "CDATA", attr.getNodeValue ()); - } - if (showNamespaces) { - if (isL2) { - if ((ns = current.getNamespaceURI ()) == null) - ns = ""; - // Note: SAX2 and DOM handle "local" names differently - if ((local = current.getLocalName ()) == null) - local = current.getNodeName (); - } else { + throw new RuntimeException ( + "NYI, ns lookup when parsing L1 DOM"); + } + } else + ns = local = ""; + attrs.addAttribute (ns, local, name, + "CDATA", attr.getNodeValue ()); + } + if (showNamespaces) { + if (isL2) { + if ((ns = current.getNamespaceURI ()) == null) + ns = ""; + // Note: SAX2 and DOM handle "local" names differently + if ((local = current.getLocalName ()) == null) + local = current.getNodeName (); + } else { // XXX - throw new RuntimeException ( - "NYI, ns lookup when parsing L1 DOM"); - } - } else - ns = local = ""; - contentHandler.startElement (ns, local, - current.getNodeName (), attrs); - if (length != 0) - attrs.clear (); - break; - - case Node.CDATA_SECTION_NODE: - lexicalHandler.startCDATA (); - chars = current.getNodeValue ().toCharArray (); - contentHandler.characters (chars, 0, chars.length); - lexicalHandler.endCDATA (); - break; - - case Node.COMMENT_NODE: - chars = current.getNodeValue ().toCharArray (); - lexicalHandler.comment (chars, 0, chars.length); - break; - - case Node.DOCUMENT_TYPE_NODE: - { - DocumentType doctype = (DocumentType) current; - - // - // Only DOM L2 supports recreating even some DTDs in full. - // - if (isL2) { - lexicalHandler.startDTD (doctype.getName (), - doctype.getPublicId (), - doctype.getSystemId ()); - } else - lexicalHandler.startDTD (doctype.getName (), - null, null); - - // - // The only sure way to recreate is to provide both the - // internal and external subsets. Otherwise, only part - // of the job can be done ... because from the DTD, DOM - // discards both the critical data, like the attribute and - // element declarations, as well as the PIs and comments - // that are used to hold their documentation. - // - // Even the entity and notation declarations that it can - // expose can't be recorded without proprietary extensions. - // - // We construct a comment to tell what we know about how - // (in)complete this particular really DTD is. - // - { - String message; - char buf []; - - // - // Though DOM L2 lets the whole doctype be recreated, - // SAX2 can't represent it (input or output). - // So this will be the typical case. - // - if (isL2 && doctype.getInternalSubset () != null) - message = - " Full DTD known; can't be shown using SAX2. "; - - // - // Otherwise, we'll concoct a partial DTD. If there's - // any more data here at all, it was provided using a - // (proprietary) extension to DOM. - // - else - message = - " This DTD was was recreated using incomplete DOM L2 records. "; - - buf = message.toCharArray (); - lexicalHandler.comment (buf, 0, buf.length); - } - - // report notations first - nodes = doctype.getNotations (); - length = nodes.getLength (); - for (int i = 0; i < length; i++) { - Notation notation = (Notation) nodes.item (i); - dtdHandler.notationDecl ( - notation.getNodeName (), - notation.getPublicId (), - notation.getSystemId ()); - } - - // then parsed and unparsed external general entities - nodes = doctype.getEntities (); - length = nodes.getLength (); - for (int i = 0; i < length; i++) { - Entity entity = (Entity) nodes.item (i); - String notation = entity.getNotationName (); - - if (notation != null) - dtdHandler.unparsedEntityDecl ( - entity.getNodeName (), - entity.getPublicId (), - entity.getSystemId (), - notation); - else if (entity.getSystemId () != null) - declHandler.externalEntityDecl ( - entity.getNodeName (), - entity.getPublicId (), - entity.getSystemId ()); - - // - // NOTE: DOM doesn't clearly provide internal - // entity support; but in case someone tries to - // fudge such support, we defend ourselves above. - // - // NOTE: DOM doesn't expose parameter entities - // (thank you thank you thank you thank you) - // - } - - // - // NOTE: DOM (levels 1 and 2) doesn't expose real - // typing information (element or attribute decls), - // as exposed by SAX2 declaration handlers. - // - lexicalHandler.endDTD (); - } - break; - - case Node.ENTITY_REFERENCE_NODE: - // this isn't done except (a) in content, and - // (b) not within a start tag (att value) - lexicalHandler.startEntity (current.getNodeName ()); - break; - - case Node.PROCESSING_INSTRUCTION_NODE: - contentHandler.processingInstruction ( - current.getNodeName (), current.getNodeValue ()); - break; - - case Node.TEXT_NODE: - chars = current.getNodeValue ().toCharArray (); - contentHandler.characters (chars, 0, chars.length); - break; - - default: - // e.g. fragments, entities, notations, attributes - throw new SAXException ("Illegal DOM Node type in Document: " - + current.getNodeType ()); - } - - // - // Then, pick the next node to visit. If the next node isn't - // a child, an "end" call may be needed before moving on. - // If there's no next node, we're done. - // - Node next; - - switch (type) { - case Node.DOCUMENT_NODE: - case Node.ELEMENT_NODE: - case Node.ENTITY_REFERENCE_NODE: - // - // For elements that can have children, visit those - // children before any siblings (i.e. depth first) - // and after visiting this node (i.e. preorder) - // - next = current.getFirstChild (); - if (next != null) { - current = next; - break; - } - // - // Else treat this like other childless nodes, but - // handle this node's "end" immediately. - // - callEnd (current); - - // FALLTHROUGH - - case Node.CDATA_SECTION_NODE: - case Node.COMMENT_NODE: - case Node.DOCUMENT_TYPE_NODE: - case Node.ENTITY_NODE: - case Node.PROCESSING_INSTRUCTION_NODE: - case Node.TEXT_NODE: - // - // Use next sibling, if there is one. - // Else, climb up a level (calling "end") - // until we find an ancestral sibling - // or until we we climb off the top (FINISH) - // - for (;;) { - if ((next = current.getNextSibling ()) != null) - break; - current = current.getParentNode (); - if (current == null || current == start) - return; - callEnd (current); - } - current = next; - break; - - default: - throw new SAXException ( - "Illegal DOM Node type found: " + current.getNodeType ()); - } - } + throw new RuntimeException ( + "NYI, ns lookup when parsing L1 DOM"); + } + } else + ns = local = ""; + contentHandler.startElement (ns, local, + current.getNodeName (), attrs); + if (length != 0) + attrs.clear (); + break; + + case Node.CDATA_SECTION_NODE: + lexicalHandler.startCDATA (); + chars = current.getNodeValue ().toCharArray (); + contentHandler.characters (chars, 0, chars.length); + lexicalHandler.endCDATA (); + break; + + case Node.COMMENT_NODE: + chars = current.getNodeValue ().toCharArray (); + lexicalHandler.comment (chars, 0, chars.length); + break; + + case Node.DOCUMENT_TYPE_NODE: + { + DocumentType doctype = (DocumentType) current; + + // + // Only DOM L2 supports recreating even some DTDs in full. + // + if (isL2) { + lexicalHandler.startDTD (doctype.getName (), + doctype.getPublicId (), + doctype.getSystemId ()); + } else + lexicalHandler.startDTD (doctype.getName (), + null, null); + + // + // The only sure way to recreate is to provide both the + // internal and external subsets. Otherwise, only part + // of the job can be done ... because from the DTD, DOM + // discards both the critical data, like the attribute and + // element declarations, as well as the PIs and comments + // that are used to hold their documentation. + // + // Even the entity and notation declarations that it can + // expose can't be recorded without proprietary extensions. + // + // We construct a comment to tell what we know about how + // (in)complete this particular really DTD is. + // + { + String message; + char buf []; + + // + // Though DOM L2 lets the whole doctype be recreated, + // SAX2 can't represent it (input or output). + // So this will be the typical case. + // + if (isL2 && doctype.getInternalSubset () != null) + message = + " Full DTD known; can't be shown using SAX2. "; + + // + // Otherwise, we'll concoct a partial DTD. If there's + // any more data here at all, it was provided using a + // (proprietary) extension to DOM. + // + else + message = + " This DTD was was recreated using incomplete DOM L2 records. "; + + buf = message.toCharArray (); + lexicalHandler.comment (buf, 0, buf.length); + } + + // report notations first + nodes = doctype.getNotations (); + length = nodes.getLength (); + for (int i = 0; i < length; i++) { + Notation notation = (Notation) nodes.item (i); + dtdHandler.notationDecl ( + notation.getNodeName (), + notation.getPublicId (), + notation.getSystemId ()); + } + + // then parsed and unparsed external general entities + nodes = doctype.getEntities (); + length = nodes.getLength (); + for (int i = 0; i < length; i++) { + Entity entity = (Entity) nodes.item (i); + String notation = entity.getNotationName (); + + if (notation != null) + dtdHandler.unparsedEntityDecl ( + entity.getNodeName (), + entity.getPublicId (), + entity.getSystemId (), + notation); + else if (entity.getSystemId () != null) + declHandler.externalEntityDecl ( + entity.getNodeName (), + entity.getPublicId (), + entity.getSystemId ()); + + // + // NOTE: DOM doesn't clearly provide internal + // entity support; but in case someone tries to + // fudge such support, we defend ourselves above. + // + // NOTE: DOM doesn't expose parameter entities + // (thank you thank you thank you thank you) + // + } + + // + // NOTE: DOM (levels 1 and 2) doesn't expose real + // typing information (element or attribute decls), + // as exposed by SAX2 declaration handlers. + // + lexicalHandler.endDTD (); + } + break; + + case Node.ENTITY_REFERENCE_NODE: + // this isn't done except (a) in content, and + // (b) not within a start tag (att value) + lexicalHandler.startEntity (current.getNodeName ()); + break; + + case Node.PROCESSING_INSTRUCTION_NODE: + contentHandler.processingInstruction ( + current.getNodeName (), current.getNodeValue ()); + break; + + case Node.TEXT_NODE: + chars = current.getNodeValue ().toCharArray (); + contentHandler.characters (chars, 0, chars.length); + break; + + default: + // e.g. fragments, entities, notations, attributes + throw new SAXException ("Illegal DOM Node type in Document: " + + current.getNodeType ()); + } + + // + // Then, pick the next node to visit. If the next node isn't + // a child, an "end" call may be needed before moving on. + // If there's no next node, we're done. + // + Node next; + + switch (type) { + case Node.DOCUMENT_NODE: + case Node.ELEMENT_NODE: + case Node.ENTITY_REFERENCE_NODE: + // + // For elements that can have children, visit those + // children before any siblings (i.e. depth first) + // and after visiting this node (i.e. preorder) + // + next = current.getFirstChild (); + if (next != null) { + current = next; + break; + } + // + // Else treat this like other childless nodes, but + // handle this node's "end" immediately. + // + callEnd (current); + + // FALLTHROUGH + + case Node.CDATA_SECTION_NODE: + case Node.COMMENT_NODE: + case Node.DOCUMENT_TYPE_NODE: + case Node.ENTITY_NODE: + case Node.PROCESSING_INSTRUCTION_NODE: + case Node.TEXT_NODE: + // + // Use next sibling, if there is one. + // Else, climb up a level (calling "end") + // until we find an ancestral sibling + // or until we we climb off the top (FINISH) + // + for (;;) { + if ((next = current.getNextSibling ()) != null) + break; + current = current.getParentNode (); + if (current == null || current == start) + return; + callEnd (current); + } + current = next; + break; + + default: + throw new SAXException ( + "Illegal DOM Node type found: " + current.getNodeType ()); + } + } } private void callEnd (Node node) throws SAXException { - switch (node.getNodeType ()) { - // only these three container types may ever be found - // directly inside a Document. - case Node.DOCUMENT_NODE: - // for SAX conformance, endDocument must always - // be called ... it's done in a "finally" clause) - return; - - case Node.ELEMENT_NODE: - if (showNamespaces) { - if (isL2) - contentHandler.endElement ( - node.getNamespaceURI (), - node.getLocalName (), - node.getNodeName ()); - else + switch (node.getNodeType ()) { + // only these three container types may ever be found + // directly inside a Document. + case Node.DOCUMENT_NODE: + // for SAX conformance, endDocument must always + // be called ... it's done in a "finally" clause) + return; + + case Node.ELEMENT_NODE: + if (showNamespaces) { + if (isL2) + contentHandler.endElement ( + node.getNamespaceURI (), + node.getLocalName (), + node.getNodeName ()); + else // XXX - throw new RuntimeException ( - "NYI, ns lookup when parsing L1 DOM"); - for (Enumeration e = prefixStack.getDeclaredPrefixes (); - e.hasMoreElements (); - ) { - contentHandler.endPrefixMapping ((String) e.nextElement ()); - } - } else - contentHandler.endElement ("", "", node.getNodeName ()); - prefixStack.popContext (); - return; - - case Node.ENTITY_REFERENCE_NODE: - // see above -- in content, outside start tags. - lexicalHandler.endEntity (node.getNodeName ()); - return; - - // these can be given at the top level - case Node.DOCUMENT_FRAGMENT_NODE: - case Node.ATTRIBUTE_NODE: - return; - - default: - throw new SAXException ( - "Illegal DOM container type found: " - + current.getNodeType ()); - } + throw new RuntimeException ( + "NYI, ns lookup when parsing L1 DOM"); + for (Enumeration e = prefixStack.getDeclaredPrefixes (); + e.hasMoreElements (); + ) { + contentHandler.endPrefixMapping ((String) e.nextElement ()); + } + } else + contentHandler.endElement ("", "", node.getNodeName ()); + prefixStack.popContext (); + return; + + case Node.ENTITY_REFERENCE_NODE: + // see above -- in content, outside start tags. + lexicalHandler.endEntity (node.getNodeName ()); + return; + + // these can be given at the top level + case Node.DOCUMENT_FRAGMENT_NODE: + case Node.ATTRIBUTE_NODE: + return; + + default: + throw new SAXException ( + "Illegal DOM container type found: " + + current.getNodeType ()); + } } } diff --git a/libjava/classpath/gnu/xml/util/Resolver.java b/libjava/classpath/gnu/xml/util/Resolver.java index 02c4693..b16f961 100644 --- a/libjava/classpath/gnu/xml/util/Resolver.java +++ b/libjava/classpath/gnu/xml/util/Resolver.java @@ -1,4 +1,4 @@ -/* Resolver.java -- +/* Resolver.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,46 +60,46 @@ public class Resolver implements EntityResolver, Cloneable * so that it uses the mappings in a specified directory. * * @param mappings Array of string pairs, where the first member - * of each pair is a PUBLIC identifier and the second is the - * name of a file, relative to the specified directory. + * of each pair is a PUBLIC identifier and the second is the + * name of a file, relative to the specified directory. * @param directory File holding the specified files. */ public static void addDirectoryMapping ( - Dictionary table, - String mappings [][], - File directory + Dictionary table, + String mappings [][], + File directory ) throws IOException { - for (int i = 0; i < mappings.length; i++) { - File file = new File (directory, mappings [i][1]); - String temp; + for (int i = 0; i < mappings.length; i++) { + File file = new File (directory, mappings [i][1]); + String temp; - if (!file.exists ()) // ?? log a warning ?? - continue; + if (!file.exists ()) // ?? log a warning ?? + continue; - temp = fileToURL (file); - table.put (mappings [i][0], temp); - } + temp = fileToURL (file); + table.put (mappings [i][0], temp); + } } - // FIXME: these *URL routines don't quite belong here, except - // that they're all in the same spirit of making it easy to - // use local filesystem URIs with XML parsers. + // FIXME: these *URL routines don't quite belong here, except + // that they're all in the same spirit of making it easy to + // use local filesystem URIs with XML parsers. /** * Provides the URL for a named file, without relying on the JDK 1.2 * {@link java.io.File#toURL File.toURL}() utility method. * * @param filename the file name to convert. Relative file names - * are resolved the way the JVM resolves them (current to the - * process-global current working directory). + * are resolved the way the JVM resolves them (current to the + * process-global current working directory). * * @exception IOException if the file does not exist */ public static String fileNameToURL (String filename) throws IOException { - return fileToURL (new File (filename)); + return fileToURL (new File (filename)); } /** @@ -107,40 +107,40 @@ public class Resolver implements EntityResolver, Cloneable * {@link java.io.File#toURL File.toURL}() utility method. * * @param f the file to convert. Relative file names - * are resolved the way the JVM resolves them (current to the - * process-global current working directory). + * are resolved the way the JVM resolves them (current to the + * process-global current working directory). * * @exception IOException if the file does not exist */ public static String fileToURL (File f) throws IOException { - String temp; - - // NOTE: the javax.xml.parsers.DocumentBuilder and - // javax.xml.transform.stream.StreamSource versions - // of this don't have this test. Some JVM versions - // don't report this error sanely through URL code. - if (!f.exists ()) - throw new IOException ("no such file: " + f.getName ()); - - // FIXME: getAbsolutePath() seems buggy; I'm seeing components - // like "/foo/../" which are clearly not "absolute" - // and should have been resolved with the filesystem. - - // Substituting "/" would be wrong, "foo" may have been - // symlinked ... the URL code will make that change - // later, so that things can get _really_ broken! - - temp = f.getAbsolutePath (); - - if (File.separatorChar != '/') - temp = temp.replace (File.separatorChar, '/'); - if (!temp.startsWith ("/")) - temp = "/" + temp; - if (!temp.endsWith ("/") && f.isDirectory ()) - temp = temp + "/"; - return "file:" + temp; + String temp; + + // NOTE: the javax.xml.parsers.DocumentBuilder and + // javax.xml.transform.stream.StreamSource versions + // of this don't have this test. Some JVM versions + // don't report this error sanely through URL code. + if (!f.exists ()) + throw new IOException ("no such file: " + f.getName ()); + + // FIXME: getAbsolutePath() seems buggy; I'm seeing components + // like "/foo/../" which are clearly not "absolute" + // and should have been resolved with the filesystem. + + // Substituting "/" would be wrong, "foo" may have been + // symlinked ... the URL code will make that change + // later, so that things can get _really_ broken! + + temp = f.getAbsolutePath (); + + if (File.separatorChar != '/') + temp = temp.replace (File.separatorChar, '/'); + if (!temp.startsWith ("/")) + temp = "/" + temp; + if (!temp.endsWith ("/") && f.isDirectory ()) + temp = temp + "/"; + return "file:" + temp; } @@ -150,34 +150,34 @@ public class Resolver implements EntityResolver, Cloneable * malformed. * * @param fileOrURL If this is the name of a file which exists, - * then its URL is returned. Otherwise the argument is returned. + * then its URL is returned. Otherwise the argument is returned. */ public static String getURL (String fileOrURL) { - try { - return fileNameToURL (fileOrURL); - } catch (Exception e) { - return fileOrURL; - } + try { + return fileNameToURL (fileOrURL); + } catch (Exception e) { + return fileOrURL; + } } // note: cloneable, this is just copied; unguarded against mods - private Dictionary pubidMapping; + private Dictionary pubidMapping; /** * Constructs a resolver which understands how to map PUBLIC identifiers * to other URIs, typically for local copies of standard DTD components. - * + * * @param dict maps PUBLIC identifiers to URIs. This is not - * copied; subsequent modifications will be reported through the - * resolution operations. + * copied; subsequent modifications will be reported through the + * resolution operations. */ public Resolver (Dictionary dict) - { pubidMapping = dict; } + { pubidMapping = dict; } + - // FIXME: want notion of a "system default" resolver, presumably // loaded with all sorts of useful stuff. At the same time need // a notion of resolver chaining (failure --> next) so that subsystems @@ -191,48 +191,48 @@ public class Resolver implements EntityResolver, Cloneable * content typing. * * @param contentType the MIME content type that will be parsed; must - * not be null. + * not be null. * @return the appropriate encoding, or null if the content type is - * not text and there's no <code>charset=...</code> attribute + * not text and there's no <code>charset=...</code> attribute */ static public String getEncoding (String contentType) { - // currently a dumb parsing algorithm that works "mostly" and handles - // ..anything...charset=ABC - // ..anything...charset=ABC;otherAttr=DEF - // ..anything...charset=ABC (comment);otherAttr=DEF - // ..anything...charset= "ABC" (comment);otherAttr=DEF - - int temp; - String encoding; - String defValue = null; - - if (contentType.startsWith ("text/")) - defValue = contentType.startsWith ("text/html") - ? "ISO-8859-1" : "US-ASCII"; - - // Assumes 'charset' is only an attribute name, not part - // of a value, comment, or other attribute name - // ALSO assumes no escaped values like "\;" or "\)" - if ((temp = contentType.indexOf ("charset")) != -1) { - // strip out everything up to '=' ... - temp = contentType.indexOf ('=', temp); - if (temp == -1) - return defValue; - encoding = contentType.substring (temp + 1); - // ... and any subsequent attributes - if ((temp = encoding.indexOf (';')) != -1) - encoding = encoding.substring (0, temp); - // ... and any comments after value - if ((temp = encoding.indexOf ('(')) != -1) - encoding = encoding.substring (0, temp); - // ... then whitespace, and any (double) quotes - encoding = encoding.trim (); - if (encoding.charAt (0) == '"') - encoding = encoding.substring (1, encoding.length () - 1); - } else - encoding = defValue; - return encoding; + // currently a dumb parsing algorithm that works "mostly" and handles + // ..anything...charset=ABC + // ..anything...charset=ABC;otherAttr=DEF + // ..anything...charset=ABC (comment);otherAttr=DEF + // ..anything...charset= "ABC" (comment);otherAttr=DEF + + int temp; + String encoding; + String defValue = null; + + if (contentType.startsWith ("text/")) + defValue = contentType.startsWith ("text/html") + ? "ISO-8859-1" : "US-ASCII"; + + // Assumes 'charset' is only an attribute name, not part + // of a value, comment, or other attribute name + // ALSO assumes no escaped values like "\;" or "\)" + if ((temp = contentType.indexOf ("charset")) != -1) { + // strip out everything up to '=' ... + temp = contentType.indexOf ('=', temp); + if (temp == -1) + return defValue; + encoding = contentType.substring (temp + 1); + // ... and any subsequent attributes + if ((temp = encoding.indexOf (';')) != -1) + encoding = encoding.substring (0, temp); + // ... and any comments after value + if ((temp = encoding.indexOf ('(')) != -1) + encoding = encoding.substring (0, temp); + // ... then whitespace, and any (double) quotes + encoding = encoding.trim (); + if (encoding.charAt (0) == '"') + encoding = encoding.substring (1, encoding.length () - 1); + } else + encoding = defValue; + return encoding; } @@ -243,21 +243,21 @@ public class Resolver implements EntityResolver, Cloneable public InputSource resolveEntity (String publicId, String systemId) throws IOException, SAXException { - InputSource retval = null; - String uri; + InputSource retval = null; + String uri; - if (publicId != null - && ((uri = (String) pubidMapping.get (publicId)) != null)) { - retval = new InputSource (uri); - retval.setPublicId (publicId); - } + if (publicId != null + && ((uri = (String) pubidMapping.get (publicId)) != null)) { + retval = new InputSource (uri); + retval.setPublicId (publicId); + } - // Could do URN resolution here + // Could do URN resolution here - // URL resolution always done by parser + // URL resolution always done by parser - // FIXME: chain to "next" resolver + // FIXME: chain to "next" resolver - return retval; + return retval; } } diff --git a/libjava/classpath/gnu/xml/util/SAXNullTransformerFactory.java b/libjava/classpath/gnu/xml/util/SAXNullTransformerFactory.java index 81ad823..3a97678 100644 --- a/libjava/classpath/gnu/xml/util/SAXNullTransformerFactory.java +++ b/libjava/classpath/gnu/xml/util/SAXNullTransformerFactory.java @@ -1,4 +1,4 @@ -/* SAXNullTransformerFactory.java -- +/* SAXNullTransformerFactory.java -- Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -95,17 +95,17 @@ import org.xml.sax.helpers.LocatorImpl; */ public class SAXNullTransformerFactory extends SAXTransformerFactory { - - private ErrorListener errListener; - private URIResolver uriResolver; - + + private ErrorListener errListener; + private URIResolver uriResolver; + /** Default constructor */ public SAXNullTransformerFactory () { } - + // // only has stuff that makes sense with null transforms // - + /** * Returns true if the requested feature is supported. * All three kinds of input and output are accepted: @@ -172,14 +172,14 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory public TransformerHandler newTransformerHandler () throws TransformerConfigurationException { - NullTransformer transformer = new NullTransformer (); + NullTransformer transformer = new NullTransformer (); return transformer.handler; } // // Stuff that depends on XSLT support, which we don't provide // - private static final String noXSLT = "No XSLT support"; + private static final String noXSLT = "No XSLT support"; /** Throws an exception (XSLT is not supported). */ public Transformer newTransformer (Source stylesheet) @@ -271,15 +271,15 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory super (DomDocument.class); setHandler (new DomHandler (this, result)); } - + } static class DomHandler extends Consumer.Backdoor { - - private DOMResult result; - + + private DOMResult result; + DomHandler (DomConsumer c, DOMResult r) throws SAXException { @@ -294,33 +294,33 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory super.endDocument (); result.setNode (getDocument ()); } - + } private static OutputStream getOutputStream (String uri) throws IOException { - // JDK stupidity: file "protocol does not support output" ... + // JDK stupidity: file "protocol does not support output" ... if (uri.startsWith ("file:")) return new FileOutputStream (uri.substring (5)); - + // Otherwise ... - URL url = new URL (uri); - URLConnection conn = url.openConnection (); - + URL url = new URL (uri); + URLConnection conn = url.openConnection (); + conn.setDoOutput (true); return conn.getOutputStream (); } - + static class NullHandler extends EventFilter implements TransformerHandler { - - private String systemId; - private Transformer transformer; - + + private String systemId; + private Transformer transformer; + NullHandler (Transformer t) { transformer = t; @@ -345,24 +345,24 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory { if (result.getSystemId () != null) systemId = result.getSystemId (); - + try { - + // output to partial SAX event stream? if (result instanceof SAXResult) { - SAXResult r = (SAXResult) result; - + SAXResult r = (SAXResult) result; + setContentHandler (r.getHandler ()); setProperty (LEXICAL_HANDLER, r.getLexicalHandler ()); // DTD info is filtered out by javax.transform - + // output to DOM tree? } else if (result instanceof DOMResult) { - DomTerminus out = new DomTerminus ((DOMResult) result); + DomTerminus out = new DomTerminus ((DOMResult) result); setContentHandler (out.getContentHandler ()); setProperty (LEXICAL_HANDLER, @@ -378,8 +378,8 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory } else if (result instanceof StreamResult) { - StreamResult r = (StreamResult) result; - XMLWriter out; + StreamResult r = (StreamResult) result; + XMLWriter out; // FIXME: when do output properties take effect? // encoding, standalone decl, xml/xhtml/... ... @@ -416,7 +416,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory setDTDHandler (out); setProperty (DECL_HANDLER, out); } - + } catch (SAXException e) { @@ -434,7 +434,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory extends LocatorImpl implements SourceLocator { - + LocatorAdapter (SAXParseException e) { setSystemId (e.getSystemId ()); @@ -442,21 +442,21 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory setLineNumber (e.getLineNumber ()); setColumnNumber (e.getColumnNumber ()); } - + } // another interface that adds no value static class ListenerAdapter implements ErrorHandler { - - NullTransformer transformer; - + + NullTransformer transformer; + ListenerAdapter (NullTransformer t) { transformer = t; } - + private TransformerException map (SAXParseException e) { return new TransformerException ( @@ -514,36 +514,36 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory static class NullTransformer extends Transformer { - - private URIResolver uriResolver; - private Properties props = new Properties (); - private Hashtable params = new Hashtable (7); - - ErrorListener errListener = null; - TransformerException ex = null; - NullHandler handler; - + + private URIResolver uriResolver; + private Properties props = new Properties (); + private Hashtable params = new Hashtable (7); + + ErrorListener errListener = null; + TransformerException ex = null; + NullHandler handler; + NullTransformer () { super (); handler = new NullHandler (this); } - + public ErrorListener getErrorListener () { return errListener; } - + public void setErrorListener (ErrorListener e) { errListener = e; } - + public URIResolver getURIResolver () { return uriResolver; } - + public void setURIResolver (URIResolver u) { uriResolver = u; @@ -553,7 +553,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory { props = (Properties) p.clone (); } - + public Properties getOutputProperties () { return (Properties) props.clone (); @@ -563,7 +563,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory { props.setProperty (name, value); } - + public String getOutputProperty (String name) { return props.getProperty (name); @@ -573,12 +573,12 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory { params.clear (); } - + public void setParameter (String name, Object value) { props.put (name, value); } - + public Object getParameter (String name) { return props.get (name); @@ -589,29 +589,29 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory { try { - XMLReader producer; - InputSource input; - + XMLReader producer; + InputSource input; + // Input from DOM? if (in instanceof DOMSource) { - DOMSource source = (DOMSource) in; - + DOMSource source = (DOMSource) in; + if (source.getNode () == null) throw new IllegalArgumentException ("no DOM node"); producer = new DomParser (source.getNode ()); input = null; - + // Input from SAX? } else if (in instanceof SAXSource) { - SAXSource source = (SAXSource) in; - + SAXSource source = (SAXSource) in; + producer = source.getXMLReader (); if (producer == null) producer = XMLReaderFactory.createXMLReader (); - + input = source.getInputSource (); if (input == null) { @@ -621,7 +621,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory throw new IllegalArgumentException ( "missing SAX input"); } - + // Input from a stream or something? } else @@ -631,7 +631,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory if (input == null) throw new IllegalArgumentException ("missing input"); } - + // preserve original namespace prefixes try { @@ -644,19 +644,19 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory /* ignore */ // FIXME if we couldn't, "NsFix" stage before the output .. } - + // arrange the output handler.setResult (out); EventFilter.bind (producer, handler); - + // then parse ... single element pipeline producer.parse (input); - + } catch (IOException e) { throw new TransformerException ("transform failed", e); - + } catch (SAXException e) { @@ -664,7 +664,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory throw ex; else throw new TransformerException ("transform failed", e); - + } finally { diff --git a/libjava/classpath/gnu/xml/util/XCat.java b/libjava/classpath/gnu/xml/util/XCat.java index 93127f4..ea23ad6 100644 --- a/libjava/classpath/gnu/xml/util/XCat.java +++ b/libjava/classpath/gnu/xml/util/XCat.java @@ -1,4 +1,4 @@ -/* XCat.java -- +/* XCat.java -- Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -76,15 +76,15 @@ import org.xml.sax.helpers.XMLReaderFactory; * <p> This has three main operational modes. The primary intended mode is * to create a resolver, then preloading it with one or more site-standard * catalogs before using it with one or more SAX parsers: <pre> - * XCat catalog = new XCat (); - * catalog.setErrorHandler (diagnosticErrorHandler); - * catalog.loadCatalog ("file:/local/catalogs/catalog.cat"); - * catalog.loadCatalog ("http://shared/catalog.cat"); - * ... - * catalog.disableLoading (); - * parser1.setEntityResolver (catalog); - * parser2.setEntityResolver (catalog); - * ...</pre> + * XCat catalog = new XCat (); + * catalog.setErrorHandler (diagnosticErrorHandler); + * catalog.loadCatalog ("file:/local/catalogs/catalog.cat"); + * catalog.loadCatalog ("http://shared/catalog.cat"); + * ... + * catalog.disableLoading (); + * parser1.setEntityResolver (catalog); + * parser2.setEntityResolver (catalog); + * ...</pre> * * <p>A second mode is to arrange that your application uses instances of * this class as its entity resolver, and automatically loads catalogs @@ -127,25 +127,25 @@ import org.xml.sax.helpers.XMLReaderFactory; */ public class XCat implements EntityResolver2 { - private Catalog catalogs []; - private boolean usingPublic = true; - private boolean loadingPermitted = true; - private boolean unified = true; - private String parserClass; - private ErrorHandler errorHandler; + private Catalog catalogs []; + private boolean usingPublic = true; + private boolean loadingPermitted = true; + private boolean unified = true; + private String parserClass; + private ErrorHandler errorHandler; - // private EntityResolver next; // chain to next if we fail... + // private EntityResolver next; // chain to next if we fail... // // NOTE: This is a straightforward implementation, and if // there are lots of "nextCatalog" or "delegate*" entries // in use, two tweaks would be worth considering: // - // - Centralize some sort of cache (key by URI) for individual - // resolvers. That'd avoid multiple copies of a given catalog. + // - Centralize some sort of cache (key by URI) for individual + // resolvers. That'd avoid multiple copies of a given catalog. // - // - Have resolution track what catalogs (+modes) have been - // searched. This would support loop detection. + // - Have resolution track what catalogs (+modes) have been + // searched. This would support loop detection. // @@ -170,7 +170,7 @@ public class XCat implements EntityResolver2 */ public XCat (String uri) throws SAXException, IOException - { loadCatalog (uri); } + { loadCatalog (uri); } /** @@ -188,7 +188,7 @@ public class XCat implements EntityResolver2 * * <p>Note that catalogs referenced by this one will not be loaded * at this time. Catalogs referenced through <em>nextCatalog</em> - * or <em>delegate*</em> elements are normally loaded only if needed. + * or <em>delegate*</em> elements are normally loaded only if needed. * * @see #setErrorHandler * @see #setParserClass @@ -197,44 +197,44 @@ public class XCat implements EntityResolver2 * @param uri absolute URI for the catalog file. * * @exception IOException As thrown by the parser, typically to - * indicate problems reading data from that URI. + * indicate problems reading data from that URI. * @exception SAXException As thrown by the parser, typically to - * indicate problems parsing data from that URI. It may also - * be thrown if the parser doesn't support necessary handlers. + * indicate problems parsing data from that URI. It may also + * be thrown if the parser doesn't support necessary handlers. * @exception IllegalStateException When attempting to load a - * catalog after loading has been {@link #disableLoading disabled}, - * such as after any entity or URI lookup has been performed. + * catalog after loading has been {@link #disableLoading disabled}, + * such as after any entity or URI lookup has been performed. */ public synchronized void loadCatalog (String uri) throws SAXException, IOException { - Catalog catalog; - int index = -1; - - if (!loadingPermitted) - throw new IllegalStateException (); - - uri = normalizeURI (uri); - if (catalogs != null) { - // maybe just reload - for (index = 0; index < catalogs.length; index++) - if (uri.equals (catalogs [index].catalogURI)) - break; - } - catalog = loadCatalog (parserClass, errorHandler, uri, unified); - - // add to list of catalogs - if (catalogs == null) { - index = 0; - catalogs = new Catalog [1]; - } else if (index == catalogs.length) { - Catalog tmp []; - - tmp = new Catalog [index + 1]; - System.arraycopy (catalogs, 0, tmp, 0, index); - catalogs = tmp; - } - catalogs [index] = catalog; + Catalog catalog; + int index = -1; + + if (!loadingPermitted) + throw new IllegalStateException (); + + uri = normalizeURI (uri); + if (catalogs != null) { + // maybe just reload + for (index = 0; index < catalogs.length; index++) + if (uri.equals (catalogs [index].catalogURI)) + break; + } + catalog = loadCatalog (parserClass, errorHandler, uri, unified); + + // add to list of catalogs + if (catalogs == null) { + index = 0; + catalogs = new Catalog [1]; + } else if (index == catalogs.length) { + Catalog tmp []; + + tmp = new Catalog [index + 1]; + System.arraycopy (catalogs, 0, tmp, 0, index); + catalogs = tmp; + } + catalogs [index] = catalog; } @@ -251,38 +251,38 @@ public class XCat implements EntityResolver2 * @param publicId Either a normalized public ID, or null. * @param baseURI Absolute base URI associated with systemId. * @param systemId URI found in entity declaration (may be - * relative to baseURI). + * relative to baseURI). * * @return Input source for accessing the external entity, or null - * if no mapping was found. The input source may have opened - * the stream, and will have a fully resolved URI. + * if no mapping was found. The input source may have opened + * the stream, and will have a fully resolved URI. * * @see #getExternalSubset */ public InputSource resolveEntity ( - String name, // UNUSED ... systemId is always non-null - String publicId, - String baseURI, // UNUSED ... it just lets sysId be relative - String systemId + String name, // UNUSED ... systemId is always non-null + String publicId, + String baseURI, // UNUSED ... it just lets sysId be relative + String systemId ) throws SAXException, IOException { - if (loadingPermitted) - disableLoading (); - - try { - // steps as found in OASIS XML catalog spec 7.1.2 - // steps 1, 8 involve looping over the list of catalogs - for (int i = 0; i < catalogs.length; i++) { - InputSource retval; - retval = catalogs [i].resolve (usingPublic, publicId, systemId); - if (retval != null) - return retval; - } - } catch (DoneDelegation x) { - // done! - } - // step 9 involves returning "no match" - return null; + if (loadingPermitted) + disableLoading (); + + try { + // steps as found in OASIS XML catalog spec 7.1.2 + // steps 1, 8 involve looping over the list of catalogs + for (int i = 0; i < catalogs.length; i++) { + InputSource retval; + retval = catalogs [i].resolve (usingPublic, publicId, systemId); + if (retval != null) + return retval; + } + } catch (DoneDelegation x) { + // done! + } + // step 9 involves returning "no match" + return null; } @@ -302,28 +302,28 @@ public class XCat implements EntityResolver2 * certain well formedess errors. * * @param name Name of the document element, either as declared in - * a DOCTYPE declaration or as observed in the text. + * a DOCTYPE declaration or as observed in the text. * @param baseURI Document's base URI (absolute). * * @return Input source for accessing the external subset, or null - * if no mapping was found. The input source may have opened - * the stream, and will have a fully resolved URI. + * if no mapping was found. The input source may have opened + * the stream, and will have a fully resolved URI. */ public InputSource getExternalSubset (String name, String baseURI) throws SAXException, IOException { - if (loadingPermitted) - disableLoading (); - try { - for (int i = 0; i < catalogs.length; i++) { - InputSource retval = catalogs [i].getExternalSubset (name); - if (retval != null) - return retval; - } - } catch (DoneDelegation x) { - // done! - } - return null; + if (loadingPermitted) + disableLoading (); + try { + for (int i = 0; i < catalogs.length; i++) { + InputSource retval = catalogs [i].getExternalSubset (name); + if (retval != null) + return retval; + } + } catch (DoneDelegation x) { + // done! + } + return null; } @@ -335,23 +335,23 @@ public class XCat implements EntityResolver2 * * <p>The functional limitations of this interface include:</p><ul> * - * <li>Since system IDs will be absolutized before the resolver - * sees them, matching against relative URIs won't work. - * This may affect <em>system</em>, <em>rewriteSystem</em>, - * and <em>delegateSystem</em> catalog entries. + * <li>Since system IDs will be absolutized before the resolver + * sees them, matching against relative URIs won't work. + * This may affect <em>system</em>, <em>rewriteSystem</em>, + * and <em>delegateSystem</em> catalog entries. * - * <li>Because of that absolutization, documents declaring entities - * with system IDs using URI schemes that the JVM does not recognize - * may be unparsable. URI schemes such as <em>file:/</em>, - * <em>http://</em>, <em>https://</em>, and <em>ftp://</em> - * will usually work reliably. + * <li>Because of that absolutization, documents declaring entities + * with system IDs using URI schemes that the JVM does not recognize + * may be unparsable. URI schemes such as <em>file:/</em>, + * <em>http://</em>, <em>https://</em>, and <em>ftp://</em> + * will usually work reliably. * - * <li>Because missing external subsets can't be provided, the - * <em>doctype</em> catalog entries will be ignored. - * (The {@link #getExternalSubset getExternalSubset()} method is - * a "New Style" resolution option.) + * <li>Because missing external subsets can't be provided, the + * <em>doctype</em> catalog entries will be ignored. + * (The {@link #getExternalSubset getExternalSubset()} method is + * a "New Style" resolution option.) * - * </ul> + * </ul> * * <p>Applications can tell whether this limited functionality will be * used: if the feature flag associated with the {@link EntityResolver2} @@ -365,13 +365,13 @@ public class XCat implements EntityResolver2 * @param systemId Always an absolute URI. * * @return Input source for accessing the external entity, or null - * if no mapping was found. The input source may have opened - * the stream, and will have a fully resolved URI. + * if no mapping was found. The input source may have opened + * the stream, and will have a fully resolved URI. */ final public InputSource resolveEntity (String publicId, String systemId) throws SAXException, IOException { - return resolveEntity (null, publicId, null, systemId); + return resolveEntity (null, publicId, null, systemId); } @@ -398,40 +398,40 @@ public class XCat implements EntityResolver2 * @see #setUnified * * @param baseURI The relevant base URI as specified by the XML Base - * specification. This recognizes <em>xml:base</em> attributes - * as overriding the actual (physical) base URI. + * specification. This recognizes <em>xml:base</em> attributes + * as overriding the actual (physical) base URI. * @param uri Either an absolute URI, or one relative to baseURI * * @return Input source for accessing the mapped URI, or null - * if no mapping was found. The input source may have opened - * the stream, and will have a fully resolved URI. + * if no mapping was found. The input source may have opened + * the stream, and will have a fully resolved URI. */ public InputSource resolveURI (String baseURI, String uri) throws SAXException, IOException { - if (loadingPermitted) - disableLoading (); - - // NOTE: baseURI isn't used here, but caller MUST have it, - // and heuristics _might_ use it in the future ... plus, - // it's symmetric with resolveEntity (). - - // steps 1, 6 involve looping - try { - for (int i = 0; i < catalogs.length; i++) { - InputSource tmp = catalogs [i].resolveURI (uri); - if (tmp != null) - return tmp; - } - } catch (DoneDelegation x) { - // done - } - // step 7 reports no match - return null; + if (loadingPermitted) + disableLoading (); + + // NOTE: baseURI isn't used here, but caller MUST have it, + // and heuristics _might_ use it in the future ... plus, + // it's symmetric with resolveEntity (). + + // steps 1, 6 involve looping + try { + for (int i = 0; i < catalogs.length; i++) { + InputSource tmp = catalogs [i].resolveURI (uri); + if (tmp != null) + return tmp; + } + } catch (DoneDelegation x) { + // done + } + // step 7 reports no match + return null; } - /** + /** * Records that catalog loading is no longer permitted. * Loading is automatically disabled when lookups are performed, * and should be manually disabled when <em>startDTD()</em> (or @@ -440,12 +440,12 @@ public class XCat implements EntityResolver2 */ public synchronized void disableLoading () { - // NOTE: this method and loadCatalog() are synchronized - // so that it's impossible to load (top level) catalogs - // after lookups start. Likewise, deferred loading is also - // synchronized (for "next" and delegated catalogs) to - // ensure that parsers can share resolvers. - loadingPermitted = false; + // NOTE: this method and loadCatalog() are synchronized + // so that it's impossible to load (top level) catalogs + // after lookups start. Likewise, deferred loading is also + // synchronized (for "next" and delegated catalogs) to + // ensure that parsers can share resolvers. + loadingPermitted = false; } @@ -457,12 +457,12 @@ public class XCat implements EntityResolver2 * @see #setErrorHandler */ public ErrorHandler getErrorHandler () - { return errorHandler; } + { return errorHandler; } /** * Assigns the error handler used to report catalog errors. * These errors may come either from the SAX2 parser or - * from the catalog parsing code driven by the parser. + * from the catalog parsing code driven by the parser. * * <p> If you're sharing the resolver between parsers, don't * change this once lookups have begun. @@ -470,10 +470,10 @@ public class XCat implements EntityResolver2 * @see #getErrorHandler * * @param parser The error handler, or null saying to use the default - * (no diagnostics, and only fatal errors terminate loading). + * (no diagnostics, and only fatal errors terminate loading). */ public void setErrorHandler (ErrorHandler handler) - { errorHandler = handler; } + { errorHandler = handler; } /** @@ -482,7 +482,7 @@ public class XCat implements EntityResolver2 * @see #setParserClass */ public String getParserClass () - { return parserClass; } + { return parserClass; } /** * Names the SAX2 parser class used to parse catalogs. @@ -498,10 +498,10 @@ public class XCat implements EntityResolver2 * @see #getParserClass * * @param parser The parser class name, or null saying to use the - * system default SAX2 parser. + * system default SAX2 parser. */ public void setParserClass (String parser) - { parserClass = parser; } + { parserClass = parser; } /** @@ -527,7 +527,7 @@ public class XCat implements EntityResolver2 * @see #setUnified */ public boolean isUnified () - { return unified; } + { return unified; } /** * Assigns the value of the flag returned by {@link #isUnified}. @@ -540,7 +540,7 @@ public class XCat implements EntityResolver2 * @param value new flag setting */ public void setUnified (boolean value) - { unified = value; } + { unified = value; } /** @@ -556,7 +556,7 @@ public class XCat implements EntityResolver2 * @see #setUsingPublic */ public boolean isUsingPublic () - { return usingPublic; } + { return usingPublic; } /** * Specifies which catalog search mode is used. @@ -572,150 +572,150 @@ public class XCat implements EntityResolver2 * @see #isUsingPublic * * @param value true to always use public identifier mappings, - * false to only use them for system ids using the <em>urn:publicid:</em> - * URI scheme. + * false to only use them for system ids using the <em>urn:publicid:</em> + * URI scheme. */ public void setUsingPublic (boolean value) - { usingPublic = value; } + { usingPublic = value; } // hmm, what's this do? :) private static Catalog loadCatalog ( - String parserClass, - ErrorHandler eh, - String uri, - boolean unified + String parserClass, + ErrorHandler eh, + String uri, + boolean unified ) throws SAXException, IOException { - XMLReader parser; - Loader loader; - boolean doesIntern = false; - - if (parserClass == null) - parser = XMLReaderFactory.createXMLReader (); - else - parser = XMLReaderFactory.createXMLReader (parserClass); - if (eh != null) - parser.setErrorHandler (eh); - // resolve-dtd-entities is at default value (unrecognized == true) - - try { - doesIntern = parser.getFeature ( - "http://xml.org/sax/features/string-interning"); - } catch (SAXNotRecognizedException e) { } - - loader = new Loader (doesIntern, eh, unified); - loader.cat.parserClass = parserClass; - loader.cat.catalogURI = uri; - - parser.setContentHandler (loader); - parser.setProperty ( - "http://xml.org/sax/properties/declaration-handler", - loader); - parser.setProperty ( - "http://xml.org/sax/properties/lexical-handler", - loader); - parser.parse (uri); - - return loader.cat; + XMLReader parser; + Loader loader; + boolean doesIntern = false; + + if (parserClass == null) + parser = XMLReaderFactory.createXMLReader (); + else + parser = XMLReaderFactory.createXMLReader (parserClass); + if (eh != null) + parser.setErrorHandler (eh); + // resolve-dtd-entities is at default value (unrecognized == true) + + try { + doesIntern = parser.getFeature ( + "http://xml.org/sax/features/string-interning"); + } catch (SAXNotRecognizedException e) { } + + loader = new Loader (doesIntern, eh, unified); + loader.cat.parserClass = parserClass; + loader.cat.catalogURI = uri; + + parser.setContentHandler (loader); + parser.setProperty ( + "http://xml.org/sax/properties/declaration-handler", + loader); + parser.setProperty ( + "http://xml.org/sax/properties/lexical-handler", + loader); + parser.parse (uri); + + return loader.cat; } // perform one or both the normalizations for public ids private static String normalizePublicId (boolean full, String publicId) { - if (publicId.startsWith ("urn:publicid:")) { - CPStringBuilder buf = new CPStringBuilder (); - char chars [] = publicId.toCharArray (); + if (publicId.startsWith ("urn:publicid:")) { + CPStringBuilder buf = new CPStringBuilder (); + char chars [] = publicId.toCharArray (); boolean hasbug = false; - for (int i = 13; i < chars.length; i++) { - switch (chars [i]) { - case '+': buf.append (' '); continue; - case ':': buf.append ("//"); continue; - case ';': buf.append ("::"); continue; - case '%': + for (int i = 13; i < chars.length; i++) { + switch (chars [i]) { + case '+': buf.append (' '); continue; + case ':': buf.append ("//"); continue; + case ';': buf.append ("::"); continue; + case '%': // FIXME unhex that char! meanwhile, warn and fallthrough ... - hasbug = true; - default: buf.append (chars [i]); continue; - } - } - publicId = buf.toString (); + hasbug = true; + default: buf.append (chars [i]); continue; + } + } + publicId = buf.toString (); if (hasbug) System.err.println ("nyet unhexing public id: " + publicId); - full = true; - } - - // SAX parsers do everything except that URN mapping, but - // we can't trust other sources to normalize correctly - if (full) { - StringTokenizer tokens; - String token; - - tokens = new StringTokenizer (publicId, " \r\n"); - publicId = null; - while (tokens.hasMoreTokens ()) { - if (publicId == null) - publicId = tokens.nextToken (); - else - publicId += " " + tokens.nextToken (); - } - } - return publicId; + full = true; + } + + // SAX parsers do everything except that URN mapping, but + // we can't trust other sources to normalize correctly + if (full) { + StringTokenizer tokens; + String token; + + tokens = new StringTokenizer (publicId, " \r\n"); + publicId = null; + while (tokens.hasMoreTokens ()) { + if (publicId == null) + publicId = tokens.nextToken (); + else + publicId += " " + tokens.nextToken (); + } + } + return publicId; } private static boolean isUriExcluded (int c) - { return c <= 0x20 || c >= 0x7f || "\"<>^`{|}".indexOf (c) != -1; } + { return c <= 0x20 || c >= 0x7f || "\"<>^`{|}".indexOf (c) != -1; } private static int hexNibble (int c) { - if (c < 10) - return c + '0'; - return ('a' - 10) + c; + if (c < 10) + return c + '0'; + return ('a' - 10) + c; } // handles URIs with "excluded" characters private static String normalizeURI (String systemId) { - int length = systemId.length (); - - for (int i = 0; i < length; i++) { - char c = systemId.charAt (i); - - // escape non-ASCII plus "excluded" characters - if (isUriExcluded (c)) { - byte buf []; - ByteArrayOutputStream out; - int b; - - // a JVM that doesn't know UTF8 and 8859_1 is unusable! - try { - buf = systemId.getBytes ("UTF8"); - out = new ByteArrayOutputStream (buf.length + 10); - - for (i = 0; i < buf.length; i++) { - b = buf [i] & 0x0ff; - if (isUriExcluded (b)) { - out.write ((int) '%'); - out.write (hexNibble (b >> 4)); - out.write (hexNibble (b & 0x0f)); - } else - out.write (b); - } - return out.toString ("8859_1"); - } catch (IOException e) { - throw new RuntimeException ( - "can't normalize URI: " + e.getMessage ()); - } - } - } - return systemId; + int length = systemId.length (); + + for (int i = 0; i < length; i++) { + char c = systemId.charAt (i); + + // escape non-ASCII plus "excluded" characters + if (isUriExcluded (c)) { + byte buf []; + ByteArrayOutputStream out; + int b; + + // a JVM that doesn't know UTF8 and 8859_1 is unusable! + try { + buf = systemId.getBytes ("UTF8"); + out = new ByteArrayOutputStream (buf.length + 10); + + for (i = 0; i < buf.length; i++) { + b = buf [i] & 0x0ff; + if (isUriExcluded (b)) { + out.write ((int) '%'); + out.write (hexNibble (b >> 4)); + out.write (hexNibble (b & 0x0f)); + } else + out.write (b); + } + return out.toString ("8859_1"); + } catch (IOException e) { + throw new RuntimeException ( + "can't normalize URI: " + e.getMessage ()); + } + } + } + return systemId; } // thrown to mark authoritative end of a search private static class DoneDelegation extends SAXException { - DoneDelegation () { } + DoneDelegation () { } } @@ -725,359 +725,359 @@ System.err.println ("nyet unhexing public id: " + publicId); */ private static class Catalog { - // loading infrastructure - String catalogURI; - ErrorHandler eh; - boolean unified; - String parserClass; - - // catalog data - boolean hasPreference; - boolean usingPublic; - - Hashtable publicIds; - Hashtable publicDelegations; - - Hashtable systemIds; - Hashtable systemRewrites; - Hashtable systemDelegations; - - Hashtable uris; - Hashtable uriRewrites; - Hashtable uriDelegations; - - Hashtable doctypes; - - Vector next; - - // nonpublic! - Catalog () { } - - - // steps as found in OASIS XML catalog spec 7.1.2 - private InputSource locatePublicId (String publicId) - throws SAXException, IOException - { - // 5. return (first) 'public' entry - if (publicIds != null) { - String retval = (String) publicIds.get (publicId); - if (retval != null) { - // IF the URI is accessible ... - return new InputSource (retval); - } - } - - // 6. return delegatePublic catalog match [complex] - if (publicDelegations != null) - return checkDelegations (publicDelegations, publicId, - publicId, null); - - return null; - } - - // steps as found in OASIS XML catalog spec 7.1.2 or 7.2.2 - private InputSource mapURI ( - String uri, - Hashtable ids, - Hashtable rewrites, - Hashtable delegations - ) throws SAXException, IOException - { - // 7.1.2: 2. return (first) 'system' entry - // 7.2.2: 2. return (first) 'uri' entry - if (ids != null) { - String retval = (String) ids.get (uri); - if (retval != null) { - // IF the URI is accessible ... - return new InputSource (retval); - } - } - - // 7.1.2: 3. return 'rewriteSystem' entries - // 7.2.2: 3. return 'rewriteURI' entries - if (rewrites != null) { - String prefix = null; - String replace = null; - int prefixLen = -1; - - for (Enumeration e = rewrites.keys (); - e.hasMoreElements (); - /* NOP */) { - String temp = (String) e.nextElement (); - int len = -1; - - if (!uri.startsWith (temp)) - continue; - if (prefix != null - && (len = temp.length ()) < prefixLen) - continue; - prefix = temp; - prefixLen = len; - replace = (String) rewrites.get (temp); - } - if (prefix != null) { - CPStringBuilder buf = new CPStringBuilder (replace); - buf.append (uri.substring (prefixLen)); - // IF the URI is accessible ... - return new InputSource (buf.toString ()); - } - } - - // 7.1.2: 4. return 'delegateSystem' catalog match [complex] - // 7.2.2: 4. return 'delegateURI' catalog match [complex] - if (delegations != null) - return checkDelegations (delegations, uri, null, uri); - - return null; - } - - - /** - * Returns a URI for an external entity. - */ - public InputSource resolve ( - boolean usingPublic, - String publicId, - String systemId - ) throws SAXException, IOException - { - boolean preferSystem; - InputSource retval; - - if (hasPreference) - preferSystem = !this.usingPublic; - else - preferSystem = !usingPublic; - - if (publicId != null) - publicId = normalizePublicId (false, publicId); - - // behavior here matches section 7.1.1 of the oasis spec - if (systemId != null) { - if (systemId.startsWith ("urn:publicid:")) { - String temp = normalizePublicId (true, systemId); - if (publicId == null) { - publicId = temp; - systemId = null; - } else if (!publicId.equals (temp)) { - // error; ok to recover by: - systemId = null; - } - } else - systemId = normalizeURI (systemId); - } - - if (systemId == null && publicId == null) - return null; - - if (systemId != null) { - retval = mapURI (systemId, systemIds, systemRewrites, - systemDelegations); - if (retval != null) { - retval.setPublicId (publicId); - return retval; - } - } - - if (publicId != null - && !(systemId != null && preferSystem)) { - retval = locatePublicId (publicId); - if (retval != null) { - retval.setPublicId (publicId); - return retval; - } - } - - // 7. apply nextCatalog entries - if (next != null) { - int length = next.size (); - for (int i = 0; i < length; i++) { - Catalog n = getNext (i); - retval = n.resolve (usingPublic, publicId, systemId); - if (retval != null) - return retval; - } - } - - return null; - } - - /** - * Maps one URI into another, for resources that are not defined - * using XML external entity or notation syntax. - */ - public InputSource resolveURI (String uri) - throws SAXException, IOException - { - if (uri.startsWith ("urn:publicid:")) - return resolve (true, normalizePublicId (true, uri), null); - - InputSource retval; - - uri = normalizeURI (uri); - - // 7.2.2 steps 2-4 - retval = mapURI (uri, uris, uriRewrites, uriDelegations); - if (retval != null) - return retval; - - // 7.2.2 step 5. apply nextCatalog entries - if (next != null) { - int length = next.size (); - for (int i = 0; i < length; i++) { - Catalog n = getNext (i); - retval = n.resolveURI (uri); - if (retval != null) - return retval; - } - } - - return null; - } - - - /** - * Finds the external subset associated with a given root element. - */ - public InputSource getExternalSubset (String name) - throws SAXException, IOException - { - if (doctypes != null) { - String value = (String) doctypes.get (name); - if (value != null) { - // IF the URI is accessible ... - return new InputSource (value); - } - } - if (next != null) { - int length = next.size (); - for (int i = 0; i < length; i++) { - Catalog n = getNext (i); - if (n == null) - continue; - InputSource retval = n.getExternalSubset (name); - if (retval != null) - return retval; - } - } - return null; - } - - private synchronized Catalog getNext (int i) - throws SAXException, IOException - { - Object obj; - - if (next == null || i < 0 || i >= next.size ()) - return null; - obj = next.elementAt (i); - if (obj instanceof Catalog) - return (Catalog) obj; - - // ok, we deferred reading that catalog till now. - // load and cache it. - Catalog cat = null; - - try { - cat = loadCatalog (parserClass, eh, (String) obj, unified); - next.setElementAt (cat, i); - } catch (SAXException e) { - // must fail quietly, says the OASIS spec - } catch (IOException e) { - // same applies here - } - return cat; - } - - private InputSource checkDelegations ( - Hashtable delegations, - String id, - String publicId, // only one of public/system - String systemId // will be non-null... - ) throws SAXException, IOException - { - Vector matches = null; - int length = 0; - - // first, see if any prefixes match. - for (Enumeration e = delegations.keys (); - e.hasMoreElements (); - /* NOP */) { - String prefix = (String) e.nextElement (); - - if (!id.startsWith (prefix)) - continue; - if (matches == null) - matches = new Vector (); - - // maintain in longer->shorter sorted order - // NOTE: assumes not many matches will fire! - int index; - - for (index = 0; index < length; index++) { - String temp = (String) matches.elementAt (index); - if (prefix.length () > temp.length ()) { - matches.insertElementAt (prefix, index); - break; - } - } - if (index == length) - matches.addElement (prefix); - length++; - } - if (matches == null) - return null; - - // now we know the list of catalogs to replace our "top level" - // list ... we use it here, rather than somehow going back and - // restarting, since this helps avoid reading most catalogs. - // this assumes stackspace won't be a problem. - for (int i = 0; i < length; i++) { - Catalog catalog = null; - InputSource result; - - // get this catalog. we may not have read it yet. - synchronized (delegations) { - Object prefix = matches.elementAt (i); - Object cat = delegations.get (prefix); - - if (cat instanceof Catalog) - catalog = (Catalog) cat; - else { - try { - // load and cache that catalog - catalog = loadCatalog (parserClass, eh, - (String) cat, unified); - delegations.put (prefix, catalog); - } catch (SAXException e) { - // must ignore, says the OASIS spec - } catch (IOException e) { - // same applies here - } - } - } - - // ignore failed loads, and proceed - if (catalog == null) - continue; - - // we have a catalog ... resolve! - // usingPublic value can't matter, there's no choice - result = catalog.resolve (true, publicId, systemId); - if (result != null) - return result; - } - - // if there were no successes, the entire - // lookup failed (all the way to top level) - throw new DoneDelegation (); - } + // loading infrastructure + String catalogURI; + ErrorHandler eh; + boolean unified; + String parserClass; + + // catalog data + boolean hasPreference; + boolean usingPublic; + + Hashtable publicIds; + Hashtable publicDelegations; + + Hashtable systemIds; + Hashtable systemRewrites; + Hashtable systemDelegations; + + Hashtable uris; + Hashtable uriRewrites; + Hashtable uriDelegations; + + Hashtable doctypes; + + Vector next; + + // nonpublic! + Catalog () { } + + + // steps as found in OASIS XML catalog spec 7.1.2 + private InputSource locatePublicId (String publicId) + throws SAXException, IOException + { + // 5. return (first) 'public' entry + if (publicIds != null) { + String retval = (String) publicIds.get (publicId); + if (retval != null) { + // IF the URI is accessible ... + return new InputSource (retval); + } + } + + // 6. return delegatePublic catalog match [complex] + if (publicDelegations != null) + return checkDelegations (publicDelegations, publicId, + publicId, null); + + return null; + } + + // steps as found in OASIS XML catalog spec 7.1.2 or 7.2.2 + private InputSource mapURI ( + String uri, + Hashtable ids, + Hashtable rewrites, + Hashtable delegations + ) throws SAXException, IOException + { + // 7.1.2: 2. return (first) 'system' entry + // 7.2.2: 2. return (first) 'uri' entry + if (ids != null) { + String retval = (String) ids.get (uri); + if (retval != null) { + // IF the URI is accessible ... + return new InputSource (retval); + } + } + + // 7.1.2: 3. return 'rewriteSystem' entries + // 7.2.2: 3. return 'rewriteURI' entries + if (rewrites != null) { + String prefix = null; + String replace = null; + int prefixLen = -1; + + for (Enumeration e = rewrites.keys (); + e.hasMoreElements (); + /* NOP */) { + String temp = (String) e.nextElement (); + int len = -1; + + if (!uri.startsWith (temp)) + continue; + if (prefix != null + && (len = temp.length ()) < prefixLen) + continue; + prefix = temp; + prefixLen = len; + replace = (String) rewrites.get (temp); + } + if (prefix != null) { + CPStringBuilder buf = new CPStringBuilder (replace); + buf.append (uri.substring (prefixLen)); + // IF the URI is accessible ... + return new InputSource (buf.toString ()); + } + } + + // 7.1.2: 4. return 'delegateSystem' catalog match [complex] + // 7.2.2: 4. return 'delegateURI' catalog match [complex] + if (delegations != null) + return checkDelegations (delegations, uri, null, uri); + + return null; + } + + + /** + * Returns a URI for an external entity. + */ + public InputSource resolve ( + boolean usingPublic, + String publicId, + String systemId + ) throws SAXException, IOException + { + boolean preferSystem; + InputSource retval; + + if (hasPreference) + preferSystem = !this.usingPublic; + else + preferSystem = !usingPublic; + + if (publicId != null) + publicId = normalizePublicId (false, publicId); + + // behavior here matches section 7.1.1 of the oasis spec + if (systemId != null) { + if (systemId.startsWith ("urn:publicid:")) { + String temp = normalizePublicId (true, systemId); + if (publicId == null) { + publicId = temp; + systemId = null; + } else if (!publicId.equals (temp)) { + // error; ok to recover by: + systemId = null; + } + } else + systemId = normalizeURI (systemId); + } + + if (systemId == null && publicId == null) + return null; + + if (systemId != null) { + retval = mapURI (systemId, systemIds, systemRewrites, + systemDelegations); + if (retval != null) { + retval.setPublicId (publicId); + return retval; + } + } + + if (publicId != null + && !(systemId != null && preferSystem)) { + retval = locatePublicId (publicId); + if (retval != null) { + retval.setPublicId (publicId); + return retval; + } + } + + // 7. apply nextCatalog entries + if (next != null) { + int length = next.size (); + for (int i = 0; i < length; i++) { + Catalog n = getNext (i); + retval = n.resolve (usingPublic, publicId, systemId); + if (retval != null) + return retval; + } + } + + return null; + } + + /** + * Maps one URI into another, for resources that are not defined + * using XML external entity or notation syntax. + */ + public InputSource resolveURI (String uri) + throws SAXException, IOException + { + if (uri.startsWith ("urn:publicid:")) + return resolve (true, normalizePublicId (true, uri), null); + + InputSource retval; + + uri = normalizeURI (uri); + + // 7.2.2 steps 2-4 + retval = mapURI (uri, uris, uriRewrites, uriDelegations); + if (retval != null) + return retval; + + // 7.2.2 step 5. apply nextCatalog entries + if (next != null) { + int length = next.size (); + for (int i = 0; i < length; i++) { + Catalog n = getNext (i); + retval = n.resolveURI (uri); + if (retval != null) + return retval; + } + } + + return null; + } + + + /** + * Finds the external subset associated with a given root element. + */ + public InputSource getExternalSubset (String name) + throws SAXException, IOException + { + if (doctypes != null) { + String value = (String) doctypes.get (name); + if (value != null) { + // IF the URI is accessible ... + return new InputSource (value); + } + } + if (next != null) { + int length = next.size (); + for (int i = 0; i < length; i++) { + Catalog n = getNext (i); + if (n == null) + continue; + InputSource retval = n.getExternalSubset (name); + if (retval != null) + return retval; + } + } + return null; + } + + private synchronized Catalog getNext (int i) + throws SAXException, IOException + { + Object obj; + + if (next == null || i < 0 || i >= next.size ()) + return null; + obj = next.elementAt (i); + if (obj instanceof Catalog) + return (Catalog) obj; + + // ok, we deferred reading that catalog till now. + // load and cache it. + Catalog cat = null; + + try { + cat = loadCatalog (parserClass, eh, (String) obj, unified); + next.setElementAt (cat, i); + } catch (SAXException e) { + // must fail quietly, says the OASIS spec + } catch (IOException e) { + // same applies here + } + return cat; + } + + private InputSource checkDelegations ( + Hashtable delegations, + String id, + String publicId, // only one of public/system + String systemId // will be non-null... + ) throws SAXException, IOException + { + Vector matches = null; + int length = 0; + + // first, see if any prefixes match. + for (Enumeration e = delegations.keys (); + e.hasMoreElements (); + /* NOP */) { + String prefix = (String) e.nextElement (); + + if (!id.startsWith (prefix)) + continue; + if (matches == null) + matches = new Vector (); + + // maintain in longer->shorter sorted order + // NOTE: assumes not many matches will fire! + int index; + + for (index = 0; index < length; index++) { + String temp = (String) matches.elementAt (index); + if (prefix.length () > temp.length ()) { + matches.insertElementAt (prefix, index); + break; + } + } + if (index == length) + matches.addElement (prefix); + length++; + } + if (matches == null) + return null; + + // now we know the list of catalogs to replace our "top level" + // list ... we use it here, rather than somehow going back and + // restarting, since this helps avoid reading most catalogs. + // this assumes stackspace won't be a problem. + for (int i = 0; i < length; i++) { + Catalog catalog = null; + InputSource result; + + // get this catalog. we may not have read it yet. + synchronized (delegations) { + Object prefix = matches.elementAt (i); + Object cat = delegations.get (prefix); + + if (cat instanceof Catalog) + catalog = (Catalog) cat; + else { + try { + // load and cache that catalog + catalog = loadCatalog (parserClass, eh, + (String) cat, unified); + delegations.put (prefix, catalog); + } catch (SAXException e) { + // must ignore, says the OASIS spec + } catch (IOException e) { + // same applies here + } + } + } + + // ignore failed loads, and proceed + if (catalog == null) + continue; + + // we have a catalog ... resolve! + // usingPublic value can't matter, there's no choice + result = catalog.resolve (true, publicId, systemId); + if (result != null) + return result; + } + + // if there were no successes, the entire + // lookup failed (all the way to top level) + throw new DoneDelegation (); + } } /** This is the namespace URI used for OASIS XML Catalogs. */ - private static final String catalogNamespace = - "urn:oasis:names:tc:entity:xmlns:xml:catalog"; + private static final String catalogNamespace = + "urn:oasis:names:tc:entity:xmlns:xml:catalog"; /** @@ -1085,527 +1085,527 @@ System.err.println ("nyet unhexing public id: " + publicId); */ private static class Loader extends DefaultHandler2 { - private boolean preInterned; - private ErrorHandler handler; - private boolean unified; - private int ignoreDepth; - private Locator locator; - private boolean started; - private Hashtable externals; - private Stack bases; - - Catalog cat = new Catalog (); - - - /** - * Constructor. - * @param flag true iff the parser already interns strings. - * @param eh Errors and warnings are delegated to this. - * @param unified true keeps one table for URI mappings; - * false matches OASIS spec, storing mappings - * for URIs and SYSTEM ids in parallel tables. - */ - Loader (boolean flag, ErrorHandler eh, boolean unified) - { - preInterned = flag; - handler = eh; - this.unified = unified; - cat.unified = unified; - cat.eh = eh; - } - - - // strips out fragments - private String nofrag (String uri) - throws SAXException - { - if (uri.indexOf ('#') != -1) { - warn ("URI with fragment: " + uri); - uri = uri.substring (0, uri.indexOf ('#')); - } - return uri; - } - - // absolutizes relative URIs - private String absolutize (String uri) - throws SAXException - { - // avoid creating URLs if they're already absolutized, - // or if the URI is already using a known scheme - if (uri.startsWith ("file:/") - || uri.startsWith ("http:/") - || uri.startsWith ("https:/") - || uri.startsWith ("ftp:/") - || uri.startsWith ("urn:") - ) - return uri; - - // otherwise, let's hope the JDK handles this URI scheme. - try { - URL base = (URL) bases.peek (); - return new URL (base, uri).toString (); - } catch (Exception e) { - fatal ("can't absolutize URI: " + uri); - return null; - } - } - - // recoverable error - private void error (String message) - throws SAXException - { - if (handler == null) - return; - handler.error (new SAXParseException (message, locator)); - } - - // nonrecoverable error - private void fatal (String message) - throws SAXException - { - SAXParseException spe; - - spe = new SAXParseException (message, locator); - if (handler != null) - handler.fatalError (spe); - throw spe; - } - - // low severity problem - private void warn (String message) - throws SAXException - { - if (handler == null) - return; - handler.warning (new SAXParseException (message, locator)); - } - - // callbacks: - - public void setDocumentLocator (Locator l) - { locator = l; } - - public void startDocument () - throws SAXException - { - if (locator == null) - error ("no locator!"); - bases = new Stack (); - String uri = locator.getSystemId (); - try { - bases.push (new URL (uri)); - } catch (IOException e) { - fatal ("bad document base URI: " + uri); - } - } - - public void endDocument () - throws SAXException - { - try { - if (!started) - error ("not a catalog!"); - } finally { - locator = null; - handler = null; - externals = null; - bases = null; - } - } - - // XML Base support for external entities. - - // NOTE: expects parser is in default "resolve-dtd-uris" mode. - public void externalEntityDecl (String name, String pub, String sys) - throws SAXException - { - if (externals == null) - externals = new Hashtable (); - if (externals.get (name) == null) - externals.put (name, pub); - } - - public void startEntity (String name) - throws SAXException - { - if (externals == null) - return; - String uri = (String) externals.get (name); - - // NOTE: breaks if an EntityResolver substitutes these URIs. - // If toplevel loader supports one, must intercept calls... - if (uri != null) { - try { - bases.push (new URL (uri)); - } catch (IOException e) { - fatal ("entity '" + name + "', bad URI: " + uri); - } - } - } - - public void endEntity (String name) - { - if (externals == null) - return; - String value = (String) externals.get (name); - - if (value != null) - bases.pop (); - } - - /** - * Processes catalog elements, saving their data. - */ - public void startElement (String namespace, String local, - String qName, Attributes atts) - throws SAXException - { - // must ignore non-catalog elements, and their contents - if (ignoreDepth != 0 || !catalogNamespace.equals (namespace)) { - ignoreDepth++; - return; - } - - // basic sanity checks - if (!preInterned) - local = local.intern (); - if (!started) { - started = true; - if ("catalog" != local) - fatal ("root element not 'catalog': " + local); - } - - // Handle any xml:base attribute - String xmlbase = atts.getValue ("xml:base"); - - if (xmlbase != null) { - URL base = (URL) bases.peek (); - try { - base = new URL (base, xmlbase); - } catch (IOException e) { - fatal ("can't resolve xml:base attribute: " + xmlbase); - } - bases.push (base); - } else - bases.push (bases.peek ()); - - // fetch multi-element attributes, apply standard tweaks - // values (uri, catalog, rewritePrefix) get normalized too, - // as a precaution and since we may compare the values - String catalog = atts.getValue ("catalog"); - if (catalog != null) - catalog = normalizeURI (absolutize (catalog)); - - String rewritePrefix = atts.getValue ("rewritePrefix"); - if (rewritePrefix != null) - rewritePrefix = normalizeURI (absolutize (rewritePrefix)); - - String systemIdStartString; - systemIdStartString = atts.getValue ("systemIdStartString"); - if (systemIdStartString != null) { - systemIdStartString = normalizeURI (systemIdStartString); - // unmatchable <rewriteSystemId>, <delegateSystemId> elements - if (systemIdStartString.startsWith ("urn:publicid:")) { - error ("systemIdStartString is really a publicId!!"); - return; - } - } - - String uri = atts.getValue ("uri"); - if (uri != null) - uri = normalizeURI (absolutize (uri)); - - String uriStartString; - uriStartString = atts.getValue ("uriStartString"); - if (uriStartString != null) { - uriStartString = normalizeURI (uriStartString); - // unmatchable <rewriteURI>, <delegateURI> elements - if (uriStartString.startsWith ("urn:publicid:")) { - error ("uriStartString is really a publicId!!"); - return; - } - } - - // strictly speaking "group" and "catalog" shouldn't nest - // ... arbitrary restriction, no evident motivation + private boolean preInterned; + private ErrorHandler handler; + private boolean unified; + private int ignoreDepth; + private Locator locator; + private boolean started; + private Hashtable externals; + private Stack bases; + + Catalog cat = new Catalog (); + + + /** + * Constructor. + * @param flag true iff the parser already interns strings. + * @param eh Errors and warnings are delegated to this. + * @param unified true keeps one table for URI mappings; + * false matches OASIS spec, storing mappings + * for URIs and SYSTEM ids in parallel tables. + */ + Loader (boolean flag, ErrorHandler eh, boolean unified) + { + preInterned = flag; + handler = eh; + this.unified = unified; + cat.unified = unified; + cat.eh = eh; + } + + + // strips out fragments + private String nofrag (String uri) + throws SAXException + { + if (uri.indexOf ('#') != -1) { + warn ("URI with fragment: " + uri); + uri = uri.substring (0, uri.indexOf ('#')); + } + return uri; + } + + // absolutizes relative URIs + private String absolutize (String uri) + throws SAXException + { + // avoid creating URLs if they're already absolutized, + // or if the URI is already using a known scheme + if (uri.startsWith ("file:/") + || uri.startsWith ("http:/") + || uri.startsWith ("https:/") + || uri.startsWith ("ftp:/") + || uri.startsWith ("urn:") + ) + return uri; + + // otherwise, let's hope the JDK handles this URI scheme. + try { + URL base = (URL) bases.peek (); + return new URL (base, uri).toString (); + } catch (Exception e) { + fatal ("can't absolutize URI: " + uri); + return null; + } + } + + // recoverable error + private void error (String message) + throws SAXException + { + if (handler == null) + return; + handler.error (new SAXParseException (message, locator)); + } + + // nonrecoverable error + private void fatal (String message) + throws SAXException + { + SAXParseException spe; + + spe = new SAXParseException (message, locator); + if (handler != null) + handler.fatalError (spe); + throw spe; + } + + // low severity problem + private void warn (String message) + throws SAXException + { + if (handler == null) + return; + handler.warning (new SAXParseException (message, locator)); + } + + // callbacks: + + public void setDocumentLocator (Locator l) + { locator = l; } + + public void startDocument () + throws SAXException + { + if (locator == null) + error ("no locator!"); + bases = new Stack (); + String uri = locator.getSystemId (); + try { + bases.push (new URL (uri)); + } catch (IOException e) { + fatal ("bad document base URI: " + uri); + } + } + + public void endDocument () + throws SAXException + { + try { + if (!started) + error ("not a catalog!"); + } finally { + locator = null; + handler = null; + externals = null; + bases = null; + } + } + + // XML Base support for external entities. + + // NOTE: expects parser is in default "resolve-dtd-uris" mode. + public void externalEntityDecl (String name, String pub, String sys) + throws SAXException + { + if (externals == null) + externals = new Hashtable (); + if (externals.get (name) == null) + externals.put (name, pub); + } + + public void startEntity (String name) + throws SAXException + { + if (externals == null) + return; + String uri = (String) externals.get (name); + + // NOTE: breaks if an EntityResolver substitutes these URIs. + // If toplevel loader supports one, must intercept calls... + if (uri != null) { + try { + bases.push (new URL (uri)); + } catch (IOException e) { + fatal ("entity '" + name + "', bad URI: " + uri); + } + } + } + + public void endEntity (String name) + { + if (externals == null) + return; + String value = (String) externals.get (name); + + if (value != null) + bases.pop (); + } + + /** + * Processes catalog elements, saving their data. + */ + public void startElement (String namespace, String local, + String qName, Attributes atts) + throws SAXException + { + // must ignore non-catalog elements, and their contents + if (ignoreDepth != 0 || !catalogNamespace.equals (namespace)) { + ignoreDepth++; + return; + } + + // basic sanity checks + if (!preInterned) + local = local.intern (); + if (!started) { + started = true; + if ("catalog" != local) + fatal ("root element not 'catalog': " + local); + } + + // Handle any xml:base attribute + String xmlbase = atts.getValue ("xml:base"); + + if (xmlbase != null) { + URL base = (URL) bases.peek (); + try { + base = new URL (base, xmlbase); + } catch (IOException e) { + fatal ("can't resolve xml:base attribute: " + xmlbase); + } + bases.push (base); + } else + bases.push (bases.peek ()); + + // fetch multi-element attributes, apply standard tweaks + // values (uri, catalog, rewritePrefix) get normalized too, + // as a precaution and since we may compare the values + String catalog = atts.getValue ("catalog"); + if (catalog != null) + catalog = normalizeURI (absolutize (catalog)); + + String rewritePrefix = atts.getValue ("rewritePrefix"); + if (rewritePrefix != null) + rewritePrefix = normalizeURI (absolutize (rewritePrefix)); + + String systemIdStartString; + systemIdStartString = atts.getValue ("systemIdStartString"); + if (systemIdStartString != null) { + systemIdStartString = normalizeURI (systemIdStartString); + // unmatchable <rewriteSystemId>, <delegateSystemId> elements + if (systemIdStartString.startsWith ("urn:publicid:")) { + error ("systemIdStartString is really a publicId!!"); + return; + } + } + + String uri = atts.getValue ("uri"); + if (uri != null) + uri = normalizeURI (absolutize (uri)); + + String uriStartString; + uriStartString = atts.getValue ("uriStartString"); + if (uriStartString != null) { + uriStartString = normalizeURI (uriStartString); + // unmatchable <rewriteURI>, <delegateURI> elements + if (uriStartString.startsWith ("urn:publicid:")) { + error ("uriStartString is really a publicId!!"); + return; + } + } + + // strictly speaking "group" and "catalog" shouldn't nest + // ... arbitrary restriction, no evident motivation // FIXME stack "prefer" settings (two elements only!) and use // them to populate different public mapping/delegation tables - if ("catalog" == local || "group" == local) { - String prefer = atts.getValue ("prefer"); - - if (prefer != null && !"public".equals (prefer)) { - if (!"system".equals (prefer)) { - error ("in <" + local + " ... prefer='...'>, " - + "assuming 'public'"); - prefer = "public"; - } - } - if (prefer != null) { - if ("catalog" == local) { - cat.hasPreference = true; - cat.usingPublic = "public".equals (prefer); - } else { - if (!cat.hasPreference || cat.usingPublic - != "public".equals (prefer)) { + if ("catalog" == local || "group" == local) { + String prefer = atts.getValue ("prefer"); + + if (prefer != null && !"public".equals (prefer)) { + if (!"system".equals (prefer)) { + error ("in <" + local + " ... prefer='...'>, " + + "assuming 'public'"); + prefer = "public"; + } + } + if (prefer != null) { + if ("catalog" == local) { + cat.hasPreference = true; + cat.usingPublic = "public".equals (prefer); + } else { + if (!cat.hasPreference || cat.usingPublic + != "public".equals (prefer)) { fatal ("<group prefer=...> case not handled"); - } - } - } else if ("group" == local && cat.hasPreference) { + } + } + } else if ("group" == local && cat.hasPreference) { fatal ("<group prefer=...> case not handled"); - } - - // - // PUBLIC ids: cleanly set up for id substitution - // - } else if ("public" == local) { - String publicId = atts.getValue ("publicId"); - String value = null; - - if (publicId == null || uri == null) { - error ("expecting <public publicId=... uri=.../>"); - return; - } - publicId = normalizePublicId (true, publicId); - uri = nofrag (uri); - if (cat.publicIds == null) - cat.publicIds = new Hashtable (); - else - value = (String) cat.publicIds.get (publicId); - if (value != null) { - if (!value.equals (uri)) - warn ("ignoring <public...> entry for " + publicId); - } else - cat.publicIds.put (publicId, uri); - - } else if ("delegatePublic" == local) { - String publicIdStartString; - Object value = null; - - publicIdStartString = atts.getValue ("publicIdStartString"); - if (publicIdStartString == null || catalog == null) { - error ("expecting <delegatePublic " - + "publicIdStartString=... catalog=.../>"); - return; - } - publicIdStartString = normalizePublicId (true, - publicIdStartString); - if (cat.publicDelegations == null) - cat.publicDelegations = new Hashtable (); - else - value = cat.publicDelegations.get (publicIdStartString); - if (value != null) { - if (!value.equals (catalog)) - warn ("ignoring <delegatePublic...> entry for " - + uriStartString); - } else - cat.publicDelegations.put (publicIdStartString, catalog); - - - // - // SYSTEM ids: need substitution due to operational issues - // - } else if ("system" == local) { - String systemId = atts.getValue ("systemId"); - String value = null; - - if (systemId == null || uri == null) { - error ("expecting <system systemId=... uri=.../>"); - return; - } - systemId = normalizeURI (systemId); - uri = nofrag (uri); - if (systemId.startsWith ("urn:publicid:")) { - error ("systemId is really a publicId!!"); - return; - } - if (cat.systemIds == null) { - cat.systemIds = new Hashtable (); - if (unified) - cat.uris = cat.systemIds; - } else - value = (String) cat.systemIds.get (systemId); - if (value != null) { - if (!value.equals (uri)) - warn ("ignoring <system...> entry for " + systemId); - } else - cat.systemIds.put (systemId, uri); - - } else if ("rewriteSystem" == local) { - String value = null; - - if (systemIdStartString == null || rewritePrefix == null - || systemIdStartString.length () == 0 - || rewritePrefix.length () == 0 - ) { - error ("expecting <rewriteSystem " - + "systemIdStartString=... rewritePrefix=.../>"); - return; - } - if (cat.systemRewrites == null) { - cat.systemRewrites = new Hashtable (); - if (unified) - cat.uriRewrites = cat.systemRewrites; - } else - value = (String) cat.systemRewrites.get ( - systemIdStartString); - if (value != null) { - if (!value.equals (rewritePrefix)) - warn ("ignoring <rewriteSystem...> entry for " - + systemIdStartString); - } else - cat.systemRewrites.put (systemIdStartString, - rewritePrefix); - - } else if ("delegateSystem" == local) { - Object value = null; - - if (systemIdStartString == null || catalog == null) { - error ("expecting <delegateSystem " - + "systemIdStartString=... catalog=.../>"); - return; - } - if (cat.systemDelegations == null) { - cat.systemDelegations = new Hashtable (); - if (unified) - cat.uriDelegations = cat.systemDelegations; - } else - value = cat.systemDelegations.get (systemIdStartString); - if (value != null) { - if (!value.equals (catalog)) - warn ("ignoring <delegateSystem...> entry for " - + uriStartString); - } else - cat.systemDelegations.put (systemIdStartString, catalog); - - - // - // URI: just like "system" ID support, except that - // fragment IDs are disallowed in "system" elements. - // - } else if ("uri" == local) { - String name = atts.getValue ("name"); - String value = null; - - if (name == null || uri == null) { - error ("expecting <uri name=... uri=.../>"); - return; - } - if (name.startsWith ("urn:publicid:")) { - error ("name is really a publicId!!"); - return; - } - name = normalizeURI (name); - if (cat.uris == null) { - cat.uris = new Hashtable (); - if (unified) - cat.systemIds = cat.uris; - } else - value = (String) cat.uris.get (name); - if (value != null) { - if (!value.equals (uri)) - warn ("ignoring <uri...> entry for " + name); - } else - cat.uris.put (name, uri); - - } else if ("rewriteURI" == local) { - String value = null; - - if (uriStartString == null || rewritePrefix == null - || uriStartString.length () == 0 - || rewritePrefix.length () == 0 - ) { - error ("expecting <rewriteURI " - + "uriStartString=... rewritePrefix=.../>"); - return; - } - if (cat.uriRewrites == null) { - cat.uriRewrites = new Hashtable (); - if (unified) - cat.systemRewrites = cat.uriRewrites; - } else - value = (String) cat.uriRewrites.get (uriStartString); - if (value != null) { - if (!value.equals (rewritePrefix)) - warn ("ignoring <rewriteURI...> entry for " - + uriStartString); - } else - cat.uriRewrites.put (uriStartString, rewritePrefix); - - } else if ("delegateURI" == local) { - Object value = null; - - if (uriStartString == null || catalog == null) { - error ("expecting <delegateURI " - + "uriStartString=... catalog=.../>"); - return; - } - if (cat.uriDelegations == null) { - cat.uriDelegations = new Hashtable (); - if (unified) - cat.systemDelegations = cat.uriDelegations; - } else - value = cat.uriDelegations.get (uriStartString); - if (value != null) { - if (!value.equals (catalog)) - warn ("ignoring <delegateURI...> entry for " - + uriStartString); - } else - cat.uriDelegations.put (uriStartString, catalog); - - // - // NON-DELEGATING approach to modularity - // - } else if ("nextCatalog" == local) { - if (catalog == null) { - error ("expecting <nextCatalog catalog=.../>"); - return; - } - if (cat.next == null) - cat.next = new Vector (); - cat.next.addElement (catalog); - - // - // EXTENSIONS from appendix E - // - } else if ("doctype" == local) { - String name = atts.getValue ("name"); - String value = null; - - if (name == null || uri == null) { - error ("expecting <doctype name=... uri=.../>"); - return; - } - name = normalizeURI (name); - if (cat.doctypes == null) - cat.doctypes = new Hashtable (); - else - value = (String) cat.doctypes.get (name); - if (value != null) { - if (!value.equals (uri)) - warn ("ignoring <doctype...> entry for " - + uriStartString); - } else - cat.doctypes.put (name, uri); - - - // - // RESERVED ... ignore (like reserved attributes) but warn - // - } else { - warn ("ignoring unknown catalog element: " + local); - ignoreDepth++; - } - } - - public void endElement (String uri, String local, String qName) - throws SAXException - { - if (ignoreDepth != 0) - ignoreDepth--; - else - bases.pop (); - } + } + + // + // PUBLIC ids: cleanly set up for id substitution + // + } else if ("public" == local) { + String publicId = atts.getValue ("publicId"); + String value = null; + + if (publicId == null || uri == null) { + error ("expecting <public publicId=... uri=.../>"); + return; + } + publicId = normalizePublicId (true, publicId); + uri = nofrag (uri); + if (cat.publicIds == null) + cat.publicIds = new Hashtable (); + else + value = (String) cat.publicIds.get (publicId); + if (value != null) { + if (!value.equals (uri)) + warn ("ignoring <public...> entry for " + publicId); + } else + cat.publicIds.put (publicId, uri); + + } else if ("delegatePublic" == local) { + String publicIdStartString; + Object value = null; + + publicIdStartString = atts.getValue ("publicIdStartString"); + if (publicIdStartString == null || catalog == null) { + error ("expecting <delegatePublic " + + "publicIdStartString=... catalog=.../>"); + return; + } + publicIdStartString = normalizePublicId (true, + publicIdStartString); + if (cat.publicDelegations == null) + cat.publicDelegations = new Hashtable (); + else + value = cat.publicDelegations.get (publicIdStartString); + if (value != null) { + if (!value.equals (catalog)) + warn ("ignoring <delegatePublic...> entry for " + + uriStartString); + } else + cat.publicDelegations.put (publicIdStartString, catalog); + + + // + // SYSTEM ids: need substitution due to operational issues + // + } else if ("system" == local) { + String systemId = atts.getValue ("systemId"); + String value = null; + + if (systemId == null || uri == null) { + error ("expecting <system systemId=... uri=.../>"); + return; + } + systemId = normalizeURI (systemId); + uri = nofrag (uri); + if (systemId.startsWith ("urn:publicid:")) { + error ("systemId is really a publicId!!"); + return; + } + if (cat.systemIds == null) { + cat.systemIds = new Hashtable (); + if (unified) + cat.uris = cat.systemIds; + } else + value = (String) cat.systemIds.get (systemId); + if (value != null) { + if (!value.equals (uri)) + warn ("ignoring <system...> entry for " + systemId); + } else + cat.systemIds.put (systemId, uri); + + } else if ("rewriteSystem" == local) { + String value = null; + + if (systemIdStartString == null || rewritePrefix == null + || systemIdStartString.length () == 0 + || rewritePrefix.length () == 0 + ) { + error ("expecting <rewriteSystem " + + "systemIdStartString=... rewritePrefix=.../>"); + return; + } + if (cat.systemRewrites == null) { + cat.systemRewrites = new Hashtable (); + if (unified) + cat.uriRewrites = cat.systemRewrites; + } else + value = (String) cat.systemRewrites.get ( + systemIdStartString); + if (value != null) { + if (!value.equals (rewritePrefix)) + warn ("ignoring <rewriteSystem...> entry for " + + systemIdStartString); + } else + cat.systemRewrites.put (systemIdStartString, + rewritePrefix); + + } else if ("delegateSystem" == local) { + Object value = null; + + if (systemIdStartString == null || catalog == null) { + error ("expecting <delegateSystem " + + "systemIdStartString=... catalog=.../>"); + return; + } + if (cat.systemDelegations == null) { + cat.systemDelegations = new Hashtable (); + if (unified) + cat.uriDelegations = cat.systemDelegations; + } else + value = cat.systemDelegations.get (systemIdStartString); + if (value != null) { + if (!value.equals (catalog)) + warn ("ignoring <delegateSystem...> entry for " + + uriStartString); + } else + cat.systemDelegations.put (systemIdStartString, catalog); + + + // + // URI: just like "system" ID support, except that + // fragment IDs are disallowed in "system" elements. + // + } else if ("uri" == local) { + String name = atts.getValue ("name"); + String value = null; + + if (name == null || uri == null) { + error ("expecting <uri name=... uri=.../>"); + return; + } + if (name.startsWith ("urn:publicid:")) { + error ("name is really a publicId!!"); + return; + } + name = normalizeURI (name); + if (cat.uris == null) { + cat.uris = new Hashtable (); + if (unified) + cat.systemIds = cat.uris; + } else + value = (String) cat.uris.get (name); + if (value != null) { + if (!value.equals (uri)) + warn ("ignoring <uri...> entry for " + name); + } else + cat.uris.put (name, uri); + + } else if ("rewriteURI" == local) { + String value = null; + + if (uriStartString == null || rewritePrefix == null + || uriStartString.length () == 0 + || rewritePrefix.length () == 0 + ) { + error ("expecting <rewriteURI " + + "uriStartString=... rewritePrefix=.../>"); + return; + } + if (cat.uriRewrites == null) { + cat.uriRewrites = new Hashtable (); + if (unified) + cat.systemRewrites = cat.uriRewrites; + } else + value = (String) cat.uriRewrites.get (uriStartString); + if (value != null) { + if (!value.equals (rewritePrefix)) + warn ("ignoring <rewriteURI...> entry for " + + uriStartString); + } else + cat.uriRewrites.put (uriStartString, rewritePrefix); + + } else if ("delegateURI" == local) { + Object value = null; + + if (uriStartString == null || catalog == null) { + error ("expecting <delegateURI " + + "uriStartString=... catalog=.../>"); + return; + } + if (cat.uriDelegations == null) { + cat.uriDelegations = new Hashtable (); + if (unified) + cat.systemDelegations = cat.uriDelegations; + } else + value = cat.uriDelegations.get (uriStartString); + if (value != null) { + if (!value.equals (catalog)) + warn ("ignoring <delegateURI...> entry for " + + uriStartString); + } else + cat.uriDelegations.put (uriStartString, catalog); + + // + // NON-DELEGATING approach to modularity + // + } else if ("nextCatalog" == local) { + if (catalog == null) { + error ("expecting <nextCatalog catalog=.../>"); + return; + } + if (cat.next == null) + cat.next = new Vector (); + cat.next.addElement (catalog); + + // + // EXTENSIONS from appendix E + // + } else if ("doctype" == local) { + String name = atts.getValue ("name"); + String value = null; + + if (name == null || uri == null) { + error ("expecting <doctype name=... uri=.../>"); + return; + } + name = normalizeURI (name); + if (cat.doctypes == null) + cat.doctypes = new Hashtable (); + else + value = (String) cat.doctypes.get (name); + if (value != null) { + if (!value.equals (uri)) + warn ("ignoring <doctype...> entry for " + + uriStartString); + } else + cat.doctypes.put (name, uri); + + + // + // RESERVED ... ignore (like reserved attributes) but warn + // + } else { + warn ("ignoring unknown catalog element: " + local); + ignoreDepth++; + } + } + + public void endElement (String uri, String local, String qName) + throws SAXException + { + if (ignoreDepth != 0) + ignoreDepth--; + else + bases.pop (); + } } } diff --git a/libjava/classpath/gnu/xml/util/XHTMLWriter.java b/libjava/classpath/gnu/xml/util/XHTMLWriter.java index 02a0afc..3a0c1ad 100644 --- a/libjava/classpath/gnu/xml/util/XHTMLWriter.java +++ b/libjava/classpath/gnu/xml/util/XHTMLWriter.java @@ -1,4 +1,4 @@ -/* XHTMLWriter.java -- +/* XHTMLWriter.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -67,7 +67,7 @@ public class XHTMLWriter extends XMLWriter public XHTMLWriter () throws IOException { - this (System.out); + this (System.out); } /** @@ -75,15 +75,15 @@ public class XHTMLWriter extends XMLWriter * is used to write SAX events in the US-ASCII encoding, as XHTML. * * @param out Where US-ASCII encoding of the stream of SAX - * events will be sent. + * events will be sent. */ public XHTMLWriter (OutputStream out) throws IOException { - // not all JVMs understand "ASCII" as an encoding name, so - // we use 8859_1 (they all seem to handle that one) and - // make the echo handler filter out non-ASCII characters - this (new OutputStreamWriter (out, "8859_1"), "US-ASCII"); + // not all JVMs understand "ASCII" as an encoding name, so + // we use 8859_1 (they all seem to handle that one) and + // make the echo handler filter out non-ASCII characters + this (new OutputStreamWriter (out, "8859_1"), "US-ASCII"); } /** @@ -94,7 +94,7 @@ public class XHTMLWriter extends XMLWriter */ public XHTMLWriter (Writer out) { - this (out, null); + this (out, null); } /** @@ -104,11 +104,11 @@ public class XHTMLWriter extends XMLWriter * * @param out Where the stream of SAX events will be written. * @param encoding If non-null, this names the encoding to be - * placed in the encoding declaration. + * placed in the encoding declaration. */ public XHTMLWriter (Writer out, String encoding) { - super (out, encoding); - setXhtml (true); + super (out, encoding); + setXhtml (true); } } diff --git a/libjava/classpath/gnu/xml/util/XMLWriter.java b/libjava/classpath/gnu/xml/util/XMLWriter.java index 2745947..a371deb 100644 --- a/libjava/classpath/gnu/xml/util/XMLWriter.java +++ b/libjava/classpath/gnu/xml/util/XMLWriter.java @@ -1,4 +1,4 @@ -/* XMLWriter.java -- +/* XMLWriter.java -- Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -111,74 +111,74 @@ public class XMLWriter implements ContentHandler, LexicalHandler, DTDHandler, DeclHandler { // text prints/escapes differently depending on context - // CTX_ENTITY ... entity literal value - // CTX_ATTRIBUTE ... attribute literal value - // CTX_CONTENT ... content of an element - // CTX_UNPARSED ... CDATA, comment, PI, names, etc + // CTX_ENTITY ... entity literal value + // CTX_ATTRIBUTE ... attribute literal value + // CTX_CONTENT ... content of an element + // CTX_UNPARSED ... CDATA, comment, PI, names, etc // CTX_NAME ... name or nmtoken, no escapes possible - private static final int CTX_ENTITY = 1; - private static final int CTX_ATTRIBUTE = 2; - private static final int CTX_CONTENT = 3; - private static final int CTX_UNPARSED = 4; - private static final int CTX_NAME = 5; + private static final int CTX_ENTITY = 1; + private static final int CTX_ATTRIBUTE = 2; + private static final int CTX_CONTENT = 3; + private static final int CTX_UNPARSED = 4; + private static final int CTX_NAME = 5; // FIXME: names (element, attribute, PI, notation, etc) are not // currently written out with range checks (escapeChars). // In non-XHTML, some names can't be directly written; panic! - private static String sysEOL; + private static String sysEOL; static { - try { - sysEOL = System.getProperty ("line.separator", "\n"); + try { + sysEOL = System.getProperty ("line.separator", "\n"); - // don't use the system's EOL if it's illegal XML. - if (!isLineEnd (sysEOL)) - sysEOL = "\n"; + // don't use the system's EOL if it's illegal XML. + if (!isLineEnd (sysEOL)) + sysEOL = "\n"; - } catch (SecurityException e) { - sysEOL = "\n"; - } + } catch (SecurityException e) { + sysEOL = "\n"; + } } private static boolean isLineEnd (String eol) { - return "\n".equals (eol) - || "\r".equals (eol) - || "\r\n".equals (eol); + return "\n".equals (eol) + || "\r".equals (eol) + || "\r\n".equals (eol); } - private Writer out; - private boolean inCDATA; - private int elementNestLevel; - private String eol = sysEOL; + private Writer out; + private boolean inCDATA; + private int elementNestLevel; + private String eol = sysEOL; - private short dangerMask; - private CPStringBuilder stringBuf; - private Locator locator; - private ErrorHandler errHandler; + private short dangerMask; + private CPStringBuilder stringBuf; + private Locator locator; + private ErrorHandler errHandler; - private boolean expandingEntities = false; - private int entityNestLevel; - private boolean xhtml; - private boolean startedDoctype; - private String encoding; + private boolean expandingEntities = false; + private int entityNestLevel; + private boolean xhtml; + private boolean startedDoctype; + private String encoding; - private boolean canonical; - private boolean inDoctype; - private boolean inEpilogue; + private boolean canonical; + private boolean inDoctype; + private boolean inEpilogue; // pretty printing controls - private boolean prettyPrinting; - private int column; - private boolean noWrap; - private Stack space = new Stack (); + private boolean prettyPrinting; + private int column; + private boolean noWrap; + private Stack space = new Stack (); // this is not a hard'n'fast rule -- longer lines are OK, // but are to be avoided. Here, prettyprinting is more to // show structure "cleanly" than to be precise about it. // better to have ragged layout than one line 24Kb long. - private static final int lineLength = 75; + private static final int lineLength = 75; /** @@ -187,7 +187,7 @@ public class XMLWriter * it's safe to close System.out at the end of the document. */ public XMLWriter () throws IOException - { this (System.out); } + { this (System.out); } /** * Constructs a handler which writes all input to the output stream @@ -198,7 +198,7 @@ public class XMLWriter */ public XMLWriter (OutputStream out) throws IOException { - this (new OutputStreamWriter (out, "UTF8")); + this (new OutputStreamWriter (out, "UTF8")); } /** @@ -215,7 +215,7 @@ public class XMLWriter */ public XMLWriter (Writer writer) { - this (writer, null); + this (writer, null); } /** @@ -248,53 +248,53 @@ public class XMLWriter * * @param writer XML text is written to this writer. * @param encoding if non-null, and an XML declaration is written, - * this is the name that will be used for the character encoding. + * this is the name that will be used for the character encoding. */ public XMLWriter (Writer writer, String encoding) { - setWriter (writer, encoding); + setWriter (writer, encoding); } - + private void setEncoding (String encoding) { - if (encoding == null && out instanceof OutputStreamWriter) - encoding = ((OutputStreamWriter)out).getEncoding (); - - if (encoding != null) { - encoding = encoding.toUpperCase (); - - // Use official encoding names where we know them, - // avoiding the Java-only names. When using common - // encodings where we can easily tell if characters - // are out of range, we'll escape out-of-range - // characters using character refs for safety. - - // I _think_ these are all the main synonyms for these! - if ("UTF8".equals (encoding)) { - encoding = "UTF-8"; - } else if ("US-ASCII".equals (encoding) - || "ASCII".equals (encoding)) { - dangerMask = (short) 0xff80; - encoding = "US-ASCII"; - } else if ("ISO-8859-1".equals (encoding) - || "8859_1".equals (encoding) - || "ISO8859_1".equals (encoding)) { - dangerMask = (short) 0xff00; - encoding = "ISO-8859-1"; - } else if ("UNICODE".equals (encoding) - || "UNICODE-BIG".equals (encoding) - || "UNICODE-LITTLE".equals (encoding)) { - encoding = "UTF-16"; - - // TODO: UTF-16BE, UTF-16LE ... no BOM; what - // release of JDK supports those Unicode names? - } - - if (dangerMask != 0) - stringBuf = new CPStringBuilder (); - } - - this.encoding = encoding; + if (encoding == null && out instanceof OutputStreamWriter) + encoding = ((OutputStreamWriter)out).getEncoding (); + + if (encoding != null) { + encoding = encoding.toUpperCase (); + + // Use official encoding names where we know them, + // avoiding the Java-only names. When using common + // encodings where we can easily tell if characters + // are out of range, we'll escape out-of-range + // characters using character refs for safety. + + // I _think_ these are all the main synonyms for these! + if ("UTF8".equals (encoding)) { + encoding = "UTF-8"; + } else if ("US-ASCII".equals (encoding) + || "ASCII".equals (encoding)) { + dangerMask = (short) 0xff80; + encoding = "US-ASCII"; + } else if ("ISO-8859-1".equals (encoding) + || "8859_1".equals (encoding) + || "ISO8859_1".equals (encoding)) { + dangerMask = (short) 0xff00; + encoding = "ISO-8859-1"; + } else if ("UNICODE".equals (encoding) + || "UNICODE-BIG".equals (encoding) + || "UNICODE-LITTLE".equals (encoding)) { + encoding = "UTF-16"; + + // TODO: UTF-16BE, UTF-16LE ... no BOM; what + // release of JDK supports those Unicode names? + } + + if (dangerMask != 0) + stringBuf = new CPStringBuilder (); + } + + this.encoding = encoding; } @@ -303,37 +303,37 @@ public class XMLWriter * * @param writer XML text is written to this writer. * @param encoding if non-null, and an XML declaration is written, - * this is the name that will be used for the character encoding. + * this is the name that will be used for the character encoding. * * @exception IllegalStateException if the current - * document hasn't yet ended (with {@link #endDocument}) + * document hasn't yet ended (with {@link #endDocument}) */ final public void setWriter (Writer writer, String encoding) { - if (out != null) - throw new IllegalStateException ( - "can't change stream in mid course"); - out = writer; - if (out != null) - setEncoding (encoding); - if (!(out instanceof BufferedWriter)) - out = new BufferedWriter (out); - space.push ("default"); + if (out != null) + throw new IllegalStateException ( + "can't change stream in mid course"); + out = writer; + if (out != null) + setEncoding (encoding); + if (!(out instanceof BufferedWriter)) + out = new BufferedWriter (out); + space.push ("default"); } /** * Assigns the line ending style to be used on output. * @param eolString null to use the system default; else - * "\n", "\r", or "\r\n". + * "\n", "\r", or "\r\n". */ final public void setEOL (String eolString) { - if (eolString == null) - eol = sysEOL; - else if (!isLineEnd (eolString)) - eol = eolString; - else - throw new IllegalArgumentException (eolString); + if (eolString == null) + eol = sysEOL; + else if (!isLineEnd (eolString)) + eol = eolString; + else + throw new IllegalArgumentException (eolString); } /** @@ -342,7 +342,7 @@ public class XMLWriter */ public void setErrorHandler (ErrorHandler handler) { - errHandler = handler; + errHandler = handler; } /** @@ -355,15 +355,15 @@ public class XMLWriter protected void fatal (String message, Exception e) throws SAXException { - SAXParseException x; - - if (locator == null) - x = new SAXParseException (message, null, null, -1, -1, e); - else - x = new SAXParseException (message, locator, e); - if (errHandler != null) - errHandler.fatalError (x); - throw x; + SAXParseException x; + + if (locator == null) + x = new SAXParseException (message, null, null, -1, -1, e); + else + x = new SAXParseException (message, locator, e); + if (errHandler != null) + errHandler.fatalError (x); + throw x; } @@ -385,47 +385,47 @@ public class XMLWriter * be careful of in all cases, as described in the appendix referenced * above, include: <ul> * - * <li> Element and attribute names must be in lower case, both - * in the document and in any CSS style sheet. - * <li> All XML constructs must be valid as defined by the XHTML - * "transitional" DTD (including all familiar constructs, - * even deprecated ones). - * <li> The root element must be "html". - * <li> Elements that must be empty (such as <em><br></em> - * must have no content. - * <li> Use both <em>lang</em> and <em>xml:lang</em> attributes - * when specifying language. - * <li> Similarly, use both <em>id</em> and <em>name</em> attributes - * when defining elements that may be referred to through - * URI fragment identifiers ... and make sure that the - * value is a legal NMTOKEN, since not all such HTML 4.0 - * identifiers are valid in XML. - * <li> Be careful with character encodings; make sure you provide - * a <em><meta http-equiv="Content-type" - * content="text/xml;charset=..." /></em> element in - * the HTML "head" element, naming the same encoding - * used to create this handler. Also, if that encoding - * is anything other than US-ASCII, make sure that if - * the document is given a MIME content type, it has - * a <em>charset=...</em> attribute with that encoding. - * </ul> + * <li> Element and attribute names must be in lower case, both + * in the document and in any CSS style sheet. + * <li> All XML constructs must be valid as defined by the XHTML + * "transitional" DTD (including all familiar constructs, + * even deprecated ones). + * <li> The root element must be "html". + * <li> Elements that must be empty (such as <em><br></em> + * must have no content. + * <li> Use both <em>lang</em> and <em>xml:lang</em> attributes + * when specifying language. + * <li> Similarly, use both <em>id</em> and <em>name</em> attributes + * when defining elements that may be referred to through + * URI fragment identifiers ... and make sure that the + * value is a legal NMTOKEN, since not all such HTML 4.0 + * identifiers are valid in XML. + * <li> Be careful with character encodings; make sure you provide + * a <em><meta http-equiv="Content-type" + * content="text/xml;charset=..." /></em> element in + * the HTML "head" element, naming the same encoding + * used to create this handler. Also, if that encoding + * is anything other than US-ASCII, make sure that if + * the document is given a MIME content type, it has + * a <em>charset=...</em> attribute with that encoding. + * </ul> * * <p> Additionally, some of the oldest browsers have additional * quirks, to address with guidelines such as: <ul> * - * <li> Processing instructions may be rendered, so avoid them. - * (Similarly for an XML declaration.) - * <li> Embedded style sheets and scripts should not contain XML - * markup delimiters: &, <, and ]]> are trouble. - * <li> Attribute values should not have line breaks or multiple - * consecutive white space characters. - * <li> Use no more than one of the deprecated (transitional) - * <em><isindex></em> elements. - * <li> Some boolean attributes (such as <em>compact, checked, - * disabled, readonly, selected,</em> and more) confuse - * some browsers, since they only understand minimized - * versions which are illegal in XML. - * </ul> + * <li> Processing instructions may be rendered, so avoid them. + * (Similarly for an XML declaration.) + * <li> Embedded style sheets and scripts should not contain XML + * markup delimiters: &, <, and ]]> are trouble. + * <li> Attribute values should not have line breaks or multiple + * consecutive white space characters. + * <li> Use no more than one of the deprecated (transitional) + * <em><isindex></em> elements. + * <li> Some boolean attributes (such as <em>compact, checked, + * disabled, readonly, selected,</em> and more) confuse + * some browsers, since they only understand minimized + * versions which are illegal in XML. + * </ul> * * <p> Also, some characteristics of the resulting output may be * a function of whether the document is later given a MIME @@ -437,11 +437,11 @@ public class XMLWriter */ final public void setXhtml (boolean value) { - if (locator != null) - throw new IllegalStateException ("started parsing"); - xhtml = value; - if (xhtml) - canonical = false; + if (locator != null) + throw new IllegalStateException ("started parsing"); + xhtml = value; + if (xhtml) + canonical = false; } /** @@ -452,7 +452,7 @@ public class XMLWriter */ final public boolean isXhtml () { - return xhtml; + return xhtml; } /** @@ -462,11 +462,11 @@ public class XMLWriter */ final public void setExpandingEntities (boolean value) { - if (locator != null) - throw new IllegalStateException ("started parsing"); - expandingEntities = value; - if (!expandingEntities) - canonical = false; + if (locator != null) + throw new IllegalStateException ("started parsing"); + expandingEntities = value; + if (!expandingEntities) + canonical = false; } /** @@ -475,7 +475,7 @@ public class XMLWriter */ final public boolean isExpandingEntities () { - return expandingEntities; + return expandingEntities; } /** @@ -499,15 +499,15 @@ public class XMLWriter * to make this be more strictly formatted! * * @exception IllegalStateException thrown if this method is invoked - * after output has begun. + * after output has begun. */ final public void setPrettyPrinting (boolean value) { - if (locator != null) - throw new IllegalStateException ("started parsing"); - prettyPrinting = value; - if (prettyPrinting) - canonical = false; + if (locator != null) + throw new IllegalStateException ("started parsing"); + prettyPrinting = value; + if (prettyPrinting) + canonical = false; } /** @@ -515,7 +515,7 @@ public class XMLWriter */ final public boolean isPrettyPrinting () { - return prettyPrinting; + return prettyPrinting; } @@ -524,31 +524,31 @@ public class XMLWriter * meet requirements that are slightly more stringent than the * basic well-formedness ones, and include: <ul> * - * <li> Namespace prefixes must not have been changed from those - * in the original document. (This may only be ensured by setting - * the SAX2 XMLReader <em>namespace-prefixes</em> feature flag; - * by default, it is cleared.) + * <li> Namespace prefixes must not have been changed from those + * in the original document. (This may only be ensured by setting + * the SAX2 XMLReader <em>namespace-prefixes</em> feature flag; + * by default, it is cleared.) * - * <li> Redundant namespace declaration attributes have been - * removed. (If an ancestor element defines a namespace prefix - * and that declaration hasn't been overriden, an element must - * not redeclare it.) + * <li> Redundant namespace declaration attributes have been + * removed. (If an ancestor element defines a namespace prefix + * and that declaration hasn't been overriden, an element must + * not redeclare it.) * - * <li> If comments are not to be included in the canonical output, - * they must first be removed from the input event stream; this - * <em>Canonical XML with comments</em> by default. + * <li> If comments are not to be included in the canonical output, + * they must first be removed from the input event stream; this + * <em>Canonical XML with comments</em> by default. * - * <li> If the input character encoding was not UCS-based, the - * character data must have been normalized using Unicode - * Normalization Form C. (UTF-8 and UTF-16 are UCS-based.) + * <li> If the input character encoding was not UCS-based, the + * character data must have been normalized using Unicode + * Normalization Form C. (UTF-8 and UTF-16 are UCS-based.) * - * <li> Attribute values must have been normalized, as is done - * by any conformant XML processor which processes all external - * parameter entities. + * <li> Attribute values must have been normalized, as is done + * by any conformant XML processor which processes all external + * parameter entities. * - * <li> Similarly, attribute value defaulting has been performed. + * <li> Similarly, attribute value defaulting has been performed. * - * </ul> + * </ul> * * <p> Note that fragments of XML documents, as specified by an XPath * node set, may be canonicalized. In such cases, elements may need @@ -556,18 +556,18 @@ public class XMLWriter * context). * * @exception IllegalArgumentException if the output encoding - * is anything other than UTF-8. + * is anything other than UTF-8. */ final public void setCanonical (boolean value) { - if (value && !"UTF-8".equals (encoding)) - throw new IllegalArgumentException ("encoding != UTF-8"); - canonical = value; - if (canonical) { - prettyPrinting = xhtml = false; - expandingEntities = true; - eol = "\n"; - } + if (value && !"UTF-8".equals (encoding)) + throw new IllegalArgumentException ("encoding != UTF-8"); + canonical = value; + if (canonical) { + prettyPrinting = xhtml = false; + expandingEntities = true; + eol = "\n"; + } } @@ -576,7 +576,7 @@ public class XMLWriter */ final public boolean isCanonical () { - return canonical; + return canonical; } @@ -588,8 +588,8 @@ public class XMLWriter final public void flush () throws IOException { - if (out != null) - out.flush (); + if (out != null) + out.flush (); } @@ -597,7 +597,7 @@ public class XMLWriter // FIXME: probably want a subclass that holds a lot of these... // and maybe more! - + /** * Writes the string as if characters() had been called on the contents * of the string. This is particularly useful when applications act as @@ -606,8 +606,8 @@ public class XMLWriter final public void write (String data) throws SAXException { - char buf [] = data.toCharArray (); - characters (buf, 0, buf.length); + char buf [] = data.toCharArray (); + characters (buf, 0, buf.length); } @@ -617,21 +617,21 @@ public class XMLWriter * @see #startElement */ public void writeElement ( - String uri, - String localName, - String qName, - Attributes atts, - String content + String uri, + String localName, + String qName, + Attributes atts, + String content ) throws SAXException { - if (content == null || content.length () == 0) { - writeEmptyElement (uri, localName, qName, atts); - return; - } - startElement (uri, localName, qName, atts); - char chars [] = content.toCharArray (); - characters (chars, 0, chars.length); - endElement (uri, localName, qName); + if (content == null || content.length () == 0) { + writeEmptyElement (uri, localName, qName, atts); + return; + } + startElement (uri, localName, qName, atts); + char chars [] = content.toCharArray (); + characters (chars, 0, chars.length); + endElement (uri, localName, qName); } @@ -642,14 +642,14 @@ public class XMLWriter * @see #startElement */ public void writeElement ( - String uri, - String localName, - String qName, - Attributes atts, - int content + String uri, + String localName, + String qName, + Attributes atts, + int content ) throws SAXException { - writeElement (uri, localName, qName, atts, Integer.toString (content)); + writeElement (uri, localName, qName, atts, Integer.toString (content)); } @@ -657,7 +657,7 @@ public class XMLWriter /** <b>SAX1</b>: provides parser status information */ final public void setDocumentLocator (Locator l) { - locator = l; + locator = l; } @@ -665,7 +665,7 @@ public class XMLWriter private static final String xhtmlFullDTD = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"; - + /** * <b>SAX1</b>: indicates the beginning of a document parse. * If you're writing (well formed) fragments of XML, neither @@ -675,60 +675,60 @@ public class XMLWriter public void startDocument () throws SAXException { - try { - if (out == null) - throw new IllegalStateException ( - "null Writer given to XMLWriter"); - - // Not all parsers provide the locator we want; this also - // flags whether events are being sent to this object yet. - // We could only have this one call if we only printed whole - // documents ... but we also print fragments, so most of the - // callbacks here replicate this test. - - if (locator == null) - locator = new LocatorImpl (); - - // Unless the data is in US-ASCII or we're canonicalizing, write - // the XML declaration if we know the encoding. US-ASCII won't - // normally get mangled by web server confusion about the - // character encodings used. Plus, it's an easy way to - // ensure we can write ASCII that's unlikely to confuse - // elderly HTML parsers. - - if (!canonical - && dangerMask != (short) 0xff80 - && encoding != null) { - rawWrite ("<?xml version='1.0'"); - rawWrite (" encoding='" + encoding + "'"); - rawWrite ("?>"); - newline (); - } - - if (xhtml) { - - rawWrite ("<!DOCTYPE html PUBLIC"); - newline (); - rawWrite (" '-//W3C//DTD XHTML 1.0 Transitional//EN'"); - newline (); - rawWrite (" '"); - // NOTE: URL (above) matches the REC - rawWrite (xhtmlFullDTD); - rawWrite ("'>"); - newline (); - newline (); - - // fake the rest of the handler into ignoring - // everything until the root element, so any - // XHTML DTD comments, PIs, etc are ignored - startedDoctype = true; - } - - entityNestLevel = 0; - - } catch (IOException e) { - fatal ("can't write", e); - } + try { + if (out == null) + throw new IllegalStateException ( + "null Writer given to XMLWriter"); + + // Not all parsers provide the locator we want; this also + // flags whether events are being sent to this object yet. + // We could only have this one call if we only printed whole + // documents ... but we also print fragments, so most of the + // callbacks here replicate this test. + + if (locator == null) + locator = new LocatorImpl (); + + // Unless the data is in US-ASCII or we're canonicalizing, write + // the XML declaration if we know the encoding. US-ASCII won't + // normally get mangled by web server confusion about the + // character encodings used. Plus, it's an easy way to + // ensure we can write ASCII that's unlikely to confuse + // elderly HTML parsers. + + if (!canonical + && dangerMask != (short) 0xff80 + && encoding != null) { + rawWrite ("<?xml version='1.0'"); + rawWrite (" encoding='" + encoding + "'"); + rawWrite ("?>"); + newline (); + } + + if (xhtml) { + + rawWrite ("<!DOCTYPE html PUBLIC"); + newline (); + rawWrite (" '-//W3C//DTD XHTML 1.0 Transitional//EN'"); + newline (); + rawWrite (" '"); + // NOTE: URL (above) matches the REC + rawWrite (xhtmlFullDTD); + rawWrite ("'>"); + newline (); + newline (); + + // fake the rest of the handler into ignoring + // everything until the root element, so any + // XHTML DTD comments, PIs, etc are ignored + startedDoctype = true; + } + + entityNestLevel = 0; + + } catch (IOException e) { + fatal ("can't write", e); + } } /** @@ -740,164 +740,164 @@ public class XMLWriter public void endDocument () throws SAXException { - try { - if (!canonical) { - newline (); - newline (); - } - out.close (); - out = null; - locator = null; - } catch (IOException e) { - fatal ("can't write", e); - } + try { + if (!canonical) { + newline (); + newline (); + } + out.close (); + out = null; + locator = null; + } catch (IOException e) { + fatal ("can't write", e); + } } // XHTML elements declared as EMPTY print differently final private static boolean isEmptyElementTag (String tag) { - switch (tag.charAt (0)) { - case 'a': return "area".equals (tag); - case 'b': return "base".equals (tag) - || "basefont".equals (tag) - || "br".equals (tag); - case 'c': return "col".equals (tag); - case 'f': return "frame".equals (tag); - case 'h': return "hr".equals (tag); - case 'i': return "img".equals (tag) - || "input".equals (tag) - || "isindex".equals (tag); - case 'l': return "link".equals (tag); - case 'm': return "meta".equals (tag); - case 'p': return "param".equals (tag); - } - return false; + switch (tag.charAt (0)) { + case 'a': return "area".equals (tag); + case 'b': return "base".equals (tag) + || "basefont".equals (tag) + || "br".equals (tag); + case 'c': return "col".equals (tag); + case 'f': return "frame".equals (tag); + case 'h': return "hr".equals (tag); + case 'i': return "img".equals (tag) + || "input".equals (tag) + || "isindex".equals (tag); + case 'l': return "link".equals (tag); + case 'm': return "meta".equals (tag); + case 'p': return "param".equals (tag); + } + return false; } private static boolean indentBefore (String tag) { - // basically indent before block content - // and within structure like tables, lists - switch (tag.charAt (0)) { - case 'a': return "applet".equals (tag); - case 'b': return "body".equals (tag) - || "blockquote".equals (tag); - case 'c': return "center".equals (tag); - case 'f': return "frame".equals (tag) - || "frameset".equals (tag); - case 'h': return "head".equals (tag); - case 'm': return "meta".equals (tag); - case 'o': return "object".equals (tag); - case 'p': return "param".equals (tag) - || "pre".equals (tag); - case 's': return "style".equals (tag); - case 't': return "title".equals (tag) - || "td".equals (tag) - || "th".equals (tag); - } - // ... but not inline elements like "em", "b", "font" - return false; + // basically indent before block content + // and within structure like tables, lists + switch (tag.charAt (0)) { + case 'a': return "applet".equals (tag); + case 'b': return "body".equals (tag) + || "blockquote".equals (tag); + case 'c': return "center".equals (tag); + case 'f': return "frame".equals (tag) + || "frameset".equals (tag); + case 'h': return "head".equals (tag); + case 'm': return "meta".equals (tag); + case 'o': return "object".equals (tag); + case 'p': return "param".equals (tag) + || "pre".equals (tag); + case 's': return "style".equals (tag); + case 't': return "title".equals (tag) + || "td".equals (tag) + || "th".equals (tag); + } + // ... but not inline elements like "em", "b", "font" + return false; } private static boolean spaceBefore (String tag) { - // blank line AND INDENT before certain structural content - switch (tag.charAt (0)) { - case 'h': return "h1".equals (tag) - || "h2".equals (tag) - || "h3".equals (tag) - || "h4".equals (tag) - || "h5".equals (tag) - || "h6".equals (tag) - || "hr".equals (tag); - case 'l': return "li".equals (tag); - case 'o': return "ol".equals (tag); - case 'p': return "p".equals (tag); - case 't': return "table".equals (tag) - || "tr".equals (tag); - case 'u': return "ul".equals (tag); - } - return false; + // blank line AND INDENT before certain structural content + switch (tag.charAt (0)) { + case 'h': return "h1".equals (tag) + || "h2".equals (tag) + || "h3".equals (tag) + || "h4".equals (tag) + || "h5".equals (tag) + || "h6".equals (tag) + || "hr".equals (tag); + case 'l': return "li".equals (tag); + case 'o': return "ol".equals (tag); + case 'p': return "p".equals (tag); + case 't': return "table".equals (tag) + || "tr".equals (tag); + case 'u': return "ul".equals (tag); + } + return false; } // XHTML DTDs say these three have xml:space="preserve" private static boolean spacePreserve (String tag) { - return "pre".equals (tag) - || "style".equals (tag) - || "script".equals (tag); + return "pre".equals (tag) + || "style".equals (tag) + || "script".equals (tag); } /** * <b>SAX2</b>: ignored. */ final public void startPrefixMapping (String prefix, String uri) - {} + {} /** * <b>SAX2</b>: ignored. */ final public void endPrefixMapping (String prefix) - {} + {} private void writeStartTag ( - String name, - Attributes atts, - boolean isEmpty + String name, + Attributes atts, + boolean isEmpty ) throws SAXException, IOException { - rawWrite ('<'); - rawWrite (name); + rawWrite ('<'); + rawWrite (name); - // write out attributes ... sorting is particularly useful - // with output that's been heavily defaulted. - if (atts != null && atts.getLength () != 0) { + // write out attributes ... sorting is particularly useful + // with output that's been heavily defaulted. + if (atts != null && atts.getLength () != 0) { - // Set up to write, with optional sorting - int indices [] = new int [atts.getLength ()]; + // Set up to write, with optional sorting + int indices [] = new int [atts.getLength ()]; - for (int i= 0; i < indices.length; i++) - indices [i] = i; - - // optionally sort + for (int i= 0; i < indices.length; i++) + indices [i] = i; + + // optionally sort // FIXME: canon xml demands xmlns nodes go first, // and sorting by URI first (empty first) then localname // it should maybe use a different sort - if (canonical || prettyPrinting) { - - // insertion sort by attribute name - for (int i = 1; i < indices.length; i++) { - int n = indices [i], j; - String s = atts.getQName (n); - - for (j = i - 1; j >= 0; j--) { - if (s.compareTo (atts.getQName (indices [j])) - >= 0) - break; - indices [j + 1] = indices [j]; - } - indices [j + 1] = n; - } - } - - // write, sorted or no - for (int i= 0; i < indices.length; i++) { - String s = atts.getQName (indices [i]); - - if (s == null || "".equals (s)) - throw new IllegalArgumentException ("no XML name"); - rawWrite (" "); - rawWrite (s); - rawWrite ("="); - writeQuotedValue (atts.getValue (indices [i]), - CTX_ATTRIBUTE); - } - } - if (isEmpty) - rawWrite (" /"); - rawWrite ('>'); + if (canonical || prettyPrinting) { + + // insertion sort by attribute name + for (int i = 1; i < indices.length; i++) { + int n = indices [i], j; + String s = atts.getQName (n); + + for (j = i - 1; j >= 0; j--) { + if (s.compareTo (atts.getQName (indices [j])) + >= 0) + break; + indices [j + 1] = indices [j]; + } + indices [j + 1] = n; + } + } + + // write, sorted or no + for (int i= 0; i < indices.length; i++) { + String s = atts.getQName (indices [i]); + + if (s == null || "".equals (s)) + throw new IllegalArgumentException ("no XML name"); + rawWrite (" "); + rawWrite (s); + rawWrite ("="); + writeQuotedValue (atts.getValue (indices [i]), + CTX_ATTRIBUTE); + } + } + if (isEmpty) + rawWrite (" /"); + rawWrite ('>'); } /** @@ -907,59 +907,59 @@ public class XMLWriter * not all user agents handle them correctly. */ final public void startElement ( - String uri, - String localName, - String qName, - Attributes atts + String uri, + String localName, + String qName, + Attributes atts ) throws SAXException { - startedDoctype = false; - - if (locator == null) - locator = new LocatorImpl (); - - if (qName == null || "".equals (qName)) - throw new IllegalArgumentException ("no XML name"); - - try { - if (entityNestLevel != 0) - return; - if (prettyPrinting) { - String whitespace = null; - - if (xhtml && spacePreserve (qName)) - whitespace = "preserve"; - else if (atts != null) - whitespace = atts.getValue ("xml:space"); - if (whitespace == null) - whitespace = (String) space.peek (); - space.push (whitespace); - - if ("default".equals (whitespace)) { - if (xhtml) { - if (spaceBefore (qName)) { - newline (); - doIndent (); - } else if (indentBefore (qName)) - doIndent (); - // else it's inlined, modulo line length - // FIXME: incrementing element nest level - // for inlined elements causes ugliness - } else - doIndent (); - } - } - elementNestLevel++; - writeStartTag (qName, atts, xhtml && isEmptyElementTag (qName)); - - if (xhtml) { + startedDoctype = false; + + if (locator == null) + locator = new LocatorImpl (); + + if (qName == null || "".equals (qName)) + throw new IllegalArgumentException ("no XML name"); + + try { + if (entityNestLevel != 0) + return; + if (prettyPrinting) { + String whitespace = null; + + if (xhtml && spacePreserve (qName)) + whitespace = "preserve"; + else if (atts != null) + whitespace = atts.getValue ("xml:space"); + if (whitespace == null) + whitespace = (String) space.peek (); + space.push (whitespace); + + if ("default".equals (whitespace)) { + if (xhtml) { + if (spaceBefore (qName)) { + newline (); + doIndent (); + } else if (indentBefore (qName)) + doIndent (); + // else it's inlined, modulo line length + // FIXME: incrementing element nest level + // for inlined elements causes ugliness + } else + doIndent (); + } + } + elementNestLevel++; + writeStartTag (qName, atts, xhtml && isEmptyElementTag (qName)); + + if (xhtml) { // FIXME: if this is an XHTML "pre" element, turn // off automatic wrapping. - } + } - } catch (IOException e) { - fatal ("can't write", e); - } + } catch (IOException e) { + fatal ("can't write", e); + } } /** @@ -967,22 +967,22 @@ public class XMLWriter * @see #startElement */ public void writeEmptyElement ( - String uri, - String localName, - String qName, - Attributes atts + String uri, + String localName, + String qName, + Attributes atts ) throws SAXException { - if (canonical) { - startElement (uri, localName, qName, atts); - endElement (uri, localName, qName); - } else { - try { - writeStartTag (qName, atts, true); - } catch (IOException e) { - fatal ("can't write", e); - } - } + if (canonical) { + startElement (uri, localName, qName, atts); + endElement (uri, localName, qName); + } else { + try { + writeStartTag (qName, atts, true); + } catch (IOException e) { + fatal ("can't write", e); + } + } } @@ -990,68 +990,68 @@ public class XMLWriter final public void endElement (String uri, String localName, String qName) throws SAXException { - if (qName == null || "".equals (qName)) - throw new IllegalArgumentException ("no XML name"); - - try { - elementNestLevel--; - if (entityNestLevel != 0) - return; - if (xhtml && isEmptyElementTag (qName)) - return; - rawWrite ("</"); - rawWrite (qName); - rawWrite ('>'); - - if (prettyPrinting) { - if (!space.empty ()) - space.pop (); - else - fatal ("stack discipline", null); - } - if (elementNestLevel == 0) - inEpilogue = true; - - } catch (IOException e) { - fatal ("can't write", e); - } + if (qName == null || "".equals (qName)) + throw new IllegalArgumentException ("no XML name"); + + try { + elementNestLevel--; + if (entityNestLevel != 0) + return; + if (xhtml && isEmptyElementTag (qName)) + return; + rawWrite ("</"); + rawWrite (qName); + rawWrite ('>'); + + if (prettyPrinting) { + if (!space.empty ()) + space.pop (); + else + fatal ("stack discipline", null); + } + if (elementNestLevel == 0) + inEpilogue = true; + + } catch (IOException e) { + fatal ("can't write", e); + } } /** <b>SAX1</b>: reports content characters */ final public void characters (char ch [], int start, int length) throws SAXException { - if (locator == null) - locator = new LocatorImpl (); - - try { - if (entityNestLevel != 0) - return; - if (inCDATA) { - escapeChars (ch, start, length, CTX_UNPARSED); - } else { - escapeChars (ch, start, length, CTX_CONTENT); - } - } catch (IOException e) { - fatal ("can't write", e); - } + if (locator == null) + locator = new LocatorImpl (); + + try { + if (entityNestLevel != 0) + return; + if (inCDATA) { + escapeChars (ch, start, length, CTX_UNPARSED); + } else { + escapeChars (ch, start, length, CTX_CONTENT); + } + } catch (IOException e) { + fatal ("can't write", e); + } } /** <b>SAX1</b>: reports ignorable whitespace */ final public void ignorableWhitespace (char ch [], int start, int length) throws SAXException { - if (locator == null) - locator = new LocatorImpl (); - - try { - if (entityNestLevel != 0) - return; - // don't forget to map NL to CRLF, CR, etc - escapeChars (ch, start, length, CTX_CONTENT); - } catch (IOException e) { - fatal ("can't write", e); - } + if (locator == null) + locator = new LocatorImpl (); + + try { + if (entityNestLevel != 0) + return; + // don't forget to map NL to CRLF, CR, etc + escapeChars (ch, start, length, CTX_CONTENT); + } catch (IOException e) { + fatal ("can't write", e); + } } /** @@ -1063,44 +1063,44 @@ public class XMLWriter final public void processingInstruction (String target, String data) throws SAXException { - if (locator == null) - locator = new LocatorImpl (); - - // don't print internal subset for XHTML - if (xhtml && startedDoctype) - return; - - // ancient HTML browsers might render these ... their loss. - // to prevent: "if (xhtml) return;". - - try { - if (entityNestLevel != 0) - return; - if (canonical && inEpilogue) - newline (); - rawWrite ("<?"); - rawWrite (target); - rawWrite (' '); - escapeChars (data.toCharArray (), -1, -1, CTX_UNPARSED); - rawWrite ("?>"); - if (elementNestLevel == 0 && !(canonical && inEpilogue)) - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + if (locator == null) + locator = new LocatorImpl (); + + // don't print internal subset for XHTML + if (xhtml && startedDoctype) + return; + + // ancient HTML browsers might render these ... their loss. + // to prevent: "if (xhtml) return;". + + try { + if (entityNestLevel != 0) + return; + if (canonical && inEpilogue) + newline (); + rawWrite ("<?"); + rawWrite (target); + rawWrite (' '); + escapeChars (data.toCharArray (), -1, -1, CTX_UNPARSED); + rawWrite ("?>"); + if (elementNestLevel == 0 && !(canonical && inEpilogue)) + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } /** <b>SAX1</b>: indicates a non-expanded entity reference */ public void skippedEntity (String name) throws SAXException { - try { - rawWrite ("&"); - rawWrite (name); - rawWrite (";"); - } catch (IOException e) { - fatal ("can't write", e); - } + try { + rawWrite ("&"); + rawWrite (name); + rawWrite (";"); + } catch (IOException e) { + fatal ("can't write", e); + } } // SAX2 LexicalHandler @@ -1109,35 +1109,35 @@ public class XMLWriter final public void startCDATA () throws SAXException { - if (locator == null) - locator = new LocatorImpl (); - - if (canonical) - return; - - try { - inCDATA = true; - if (entityNestLevel == 0) - rawWrite ("<![CDATA["); - } catch (IOException e) { - fatal ("can't write", e); - } + if (locator == null) + locator = new LocatorImpl (); + + if (canonical) + return; + + try { + inCDATA = true; + if (entityNestLevel == 0) + rawWrite ("<![CDATA["); + } catch (IOException e) { + fatal ("can't write", e); + } } /** <b>SAX2</b>: called after parsing CDATA characters */ final public void endCDATA () throws SAXException { - if (canonical) - return; - - try { - inCDATA = false; - if (entityNestLevel == 0) - rawWrite ("]]>"); - } catch (IOException e) { - fatal ("can't write", e); - } + if (canonical) + return; + + try { + inCDATA = false; + if (entityNestLevel == 0) + rawWrite ("]]>"); + } catch (IOException e) { + fatal ("can't write", e); + } } /** @@ -1148,45 +1148,45 @@ public class XMLWriter final public void startDTD (String name, String publicId, String systemId) throws SAXException { - if (locator == null) - locator = new LocatorImpl (); - if (xhtml) - return; - try { - inDoctype = startedDoctype = true; - if (canonical) - return; - rawWrite ("<!DOCTYPE "); - rawWrite (name); - rawWrite (' '); - - if (!expandingEntities) { - if (publicId != null) - rawWrite ("PUBLIC '" + publicId + "' '" + systemId + "' "); - else if (systemId != null) - rawWrite ("SYSTEM '" + systemId + "' "); - } - - rawWrite ('['); - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + if (locator == null) + locator = new LocatorImpl (); + if (xhtml) + return; + try { + inDoctype = startedDoctype = true; + if (canonical) + return; + rawWrite ("<!DOCTYPE "); + rawWrite (name); + rawWrite (' '); + + if (!expandingEntities) { + if (publicId != null) + rawWrite ("PUBLIC '" + publicId + "' '" + systemId + "' "); + else if (systemId != null) + rawWrite ("SYSTEM '" + systemId + "' "); + } + + rawWrite ('['); + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } /** <b>SAX2</b>: called after the doctype is parsed */ final public void endDTD () throws SAXException { - inDoctype = false; - if (canonical || xhtml) - return; - try { - rawWrite ("]>"); - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + inDoctype = false; + if (canonical || xhtml) + return; + try { + rawWrite ("]>"); + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } /** @@ -1195,30 +1195,30 @@ public class XMLWriter final public void startEntity (String name) throws SAXException { - try { - boolean writeEOL = true; - - // Predefined XHTML entities (for characters) will get - // mapped back later. - if (xhtml || expandingEntities) - return; - - entityNestLevel++; - if (name.equals ("[dtd]")) - return; - if (entityNestLevel != 1) - return; - if (!name.startsWith ("%")) { - writeEOL = false; - rawWrite ('&'); - } - rawWrite (name); - rawWrite (';'); - if (writeEOL) - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + try { + boolean writeEOL = true; + + // Predefined XHTML entities (for characters) will get + // mapped back later. + if (xhtml || expandingEntities) + return; + + entityNestLevel++; + if (name.equals ("[dtd]")) + return; + if (entityNestLevel != 1) + return; + if (!name.startsWith ("%")) { + writeEOL = false; + rawWrite ('&'); + } + rawWrite (name); + rawWrite (';'); + if (writeEOL) + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } /** @@ -1227,9 +1227,9 @@ public class XMLWriter final public void endEntity (String name) throws SAXException { - if (xhtml || expandingEntities) - return; - entityNestLevel--; + if (xhtml || expandingEntities) + return; + entityNestLevel--; } /** @@ -1243,294 +1243,294 @@ public class XMLWriter final public void comment (char ch [], int start, int length) throws SAXException { - if (locator == null) - locator = new LocatorImpl (); - - // don't print internal subset for XHTML - if (xhtml && startedDoctype) - return; - // don't print comment in doctype for canon xml - if (canonical && inDoctype) - return; - - try { - boolean indent; - - if (prettyPrinting && space.empty ()) - fatal ("stack discipline", null); - indent = prettyPrinting && "default".equals (space.peek ()); - if (entityNestLevel != 0) - return; - if (indent) - doIndent (); - if (canonical && inEpilogue) - newline (); - rawWrite ("<!--"); - escapeChars (ch, start, length, CTX_UNPARSED); - rawWrite ("-->"); - if (indent) - doIndent (); - if (elementNestLevel == 0 && !(canonical && inEpilogue)) - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + if (locator == null) + locator = new LocatorImpl (); + + // don't print internal subset for XHTML + if (xhtml && startedDoctype) + return; + // don't print comment in doctype for canon xml + if (canonical && inDoctype) + return; + + try { + boolean indent; + + if (prettyPrinting && space.empty ()) + fatal ("stack discipline", null); + indent = prettyPrinting && "default".equals (space.peek ()); + if (entityNestLevel != 0) + return; + if (indent) + doIndent (); + if (canonical && inEpilogue) + newline (); + rawWrite ("<!--"); + escapeChars (ch, start, length, CTX_UNPARSED); + rawWrite ("-->"); + if (indent) + doIndent (); + if (elementNestLevel == 0 && !(canonical && inEpilogue)) + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } // SAX1 DTDHandler /** <b>SAX1</b>: called on notation declarations */ final public void notationDecl (String name, - String publicId, String systemId) + String publicId, String systemId) throws SAXException { - if (xhtml) - return; - try { - // At this time, only SAX2 callbacks start these. - if (!startedDoctype) - return; - - if (entityNestLevel != 0) - return; - rawWrite ("<!NOTATION " + name + " "); - if (publicId != null) - rawWrite ("PUBLIC \"" + publicId + '"'); - else - rawWrite ("SYSTEM "); - if (systemId != null) - rawWrite ('"' + systemId + '"'); - rawWrite (">"); - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + if (xhtml) + return; + try { + // At this time, only SAX2 callbacks start these. + if (!startedDoctype) + return; + + if (entityNestLevel != 0) + return; + rawWrite ("<!NOTATION " + name + " "); + if (publicId != null) + rawWrite ("PUBLIC \"" + publicId + '"'); + else + rawWrite ("SYSTEM "); + if (systemId != null) + rawWrite ('"' + systemId + '"'); + rawWrite (">"); + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } /** <b>SAX1</b>: called on unparsed entity declarations */ final public void unparsedEntityDecl (String name, - String publicId, String systemId, - String notationName) + String publicId, String systemId, + String notationName) throws SAXException { - if (xhtml) - return; - try { - // At this time, only SAX2 callbacks start these. - if (!startedDoctype) { - // FIXME: write to temporary buffer, and make the start - // of the root element write these declarations. - return; - } - - if (entityNestLevel != 0) - return; - rawWrite ("<!ENTITY " + name + " "); - if (publicId != null) - rawWrite ("PUBLIC \"" + publicId + '"'); - else - rawWrite ("SYSTEM "); - rawWrite ('"' + systemId + '"'); - rawWrite (" NDATA " + notationName + ">"); - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + if (xhtml) + return; + try { + // At this time, only SAX2 callbacks start these. + if (!startedDoctype) { + // FIXME: write to temporary buffer, and make the start + // of the root element write these declarations. + return; + } + + if (entityNestLevel != 0) + return; + rawWrite ("<!ENTITY " + name + " "); + if (publicId != null) + rawWrite ("PUBLIC \"" + publicId + '"'); + else + rawWrite ("SYSTEM "); + rawWrite ('"' + systemId + '"'); + rawWrite (" NDATA " + notationName + ">"); + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } // SAX2 DeclHandler /** <b>SAX2</b>: called on attribute declarations */ final public void attributeDecl (String eName, String aName, - String type, String mode, String value) + String type, String mode, String value) throws SAXException { - if (xhtml) - return; - try { - // At this time, only SAX2 callbacks start these. - if (!startedDoctype) - return; - if (entityNestLevel != 0) - return; - rawWrite ("<!ATTLIST " + eName + ' ' + aName + ' '); - rawWrite (type); - rawWrite (' '); - if (mode != null) - rawWrite (mode + ' '); - if (value != null) - writeQuotedValue (value, CTX_ATTRIBUTE); - rawWrite ('>'); - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + if (xhtml) + return; + try { + // At this time, only SAX2 callbacks start these. + if (!startedDoctype) + return; + if (entityNestLevel != 0) + return; + rawWrite ("<!ATTLIST " + eName + ' ' + aName + ' '); + rawWrite (type); + rawWrite (' '); + if (mode != null) + rawWrite (mode + ' '); + if (value != null) + writeQuotedValue (value, CTX_ATTRIBUTE); + rawWrite ('>'); + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } /** <b>SAX2</b>: called on element declarations */ final public void elementDecl (String name, String model) throws SAXException { - if (xhtml) - return; - try { - // At this time, only SAX2 callbacks start these. - if (!startedDoctype) - return; - if (entityNestLevel != 0) - return; - rawWrite ("<!ELEMENT " + name + ' ' + model + '>'); - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + if (xhtml) + return; + try { + // At this time, only SAX2 callbacks start these. + if (!startedDoctype) + return; + if (entityNestLevel != 0) + return; + rawWrite ("<!ELEMENT " + name + ' ' + model + '>'); + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } /** <b>SAX2</b>: called on external entity declarations */ final public void externalEntityDecl ( - String name, - String publicId, - String systemId) + String name, + String publicId, + String systemId) throws SAXException { - if (xhtml) - return; - try { - // At this time, only SAX2 callbacks start these. - if (!startedDoctype) - return; - if (entityNestLevel != 0) - return; - rawWrite ("<!ENTITY "); - if (name.startsWith ("%")) { - rawWrite ("% "); - rawWrite (name.substring (1)); - } else - rawWrite (name); - if (publicId != null) - rawWrite (" PUBLIC \"" + publicId + '"'); - else - rawWrite (" SYSTEM "); - rawWrite ('"' + systemId + "\">"); - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + if (xhtml) + return; + try { + // At this time, only SAX2 callbacks start these. + if (!startedDoctype) + return; + if (entityNestLevel != 0) + return; + rawWrite ("<!ENTITY "); + if (name.startsWith ("%")) { + rawWrite ("% "); + rawWrite (name.substring (1)); + } else + rawWrite (name); + if (publicId != null) + rawWrite (" PUBLIC \"" + publicId + '"'); + else + rawWrite (" SYSTEM "); + rawWrite ('"' + systemId + "\">"); + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } /** <b>SAX2</b>: called on internal entity declarations */ final public void internalEntityDecl (String name, String value) throws SAXException { - if (xhtml) - return; - try { - // At this time, only SAX2 callbacks start these. - if (!startedDoctype) - return; - if (entityNestLevel != 0) - return; - rawWrite ("<!ENTITY "); - if (name.startsWith ("%")) { - rawWrite ("% "); - rawWrite (name.substring (1)); - } else - rawWrite (name); - rawWrite (' '); - writeQuotedValue (value, CTX_ENTITY); - rawWrite ('>'); - newline (); - } catch (IOException e) { - fatal ("can't write", e); - } + if (xhtml) + return; + try { + // At this time, only SAX2 callbacks start these. + if (!startedDoctype) + return; + if (entityNestLevel != 0) + return; + rawWrite ("<!ENTITY "); + if (name.startsWith ("%")) { + rawWrite ("% "); + rawWrite (name.substring (1)); + } else + rawWrite (name); + rawWrite (' '); + writeQuotedValue (value, CTX_ENTITY); + rawWrite ('>'); + newline (); + } catch (IOException e) { + fatal ("can't write", e); + } } private void writeQuotedValue (String value, int code) throws SAXException, IOException { - char buf [] = value.toCharArray (); - int off = 0, len = buf.length; - - // we can't add line breaks to attribute/entity/... values - noWrap = true; - rawWrite ('"'); - escapeChars (buf, off, len, code); - rawWrite ('"'); - noWrap = false; + char buf [] = value.toCharArray (); + int off = 0, len = buf.length; + + // we can't add line breaks to attribute/entity/... values + noWrap = true; + rawWrite ('"'); + escapeChars (buf, off, len, code); + rawWrite ('"'); + noWrap = false; } - + // From "HTMLlat1x.ent" ... names of entities for ISO-8859-1 // (Latin/1) characters, all codes: 160-255 (0xA0-0xFF). // Codes 128-159 have no assigned values. private static final String HTMLlat1x [] = { - // 160 - "nbsp", "iexcl", "cent", "pound", "curren", - "yen", "brvbar", "sect", "uml", "copy", + // 160 + "nbsp", "iexcl", "cent", "pound", "curren", + "yen", "brvbar", "sect", "uml", "copy", - // 170 - "ordf", "laquo", "not", "shy", "reg", - "macr", "deg", "plusmn", "sup2", "sup3", + // 170 + "ordf", "laquo", "not", "shy", "reg", + "macr", "deg", "plusmn", "sup2", "sup3", - // 180 - "acute", "micro", "para", "middot", "cedil", - "sup1", "ordm", "raquo", "frac14", "frac12", + // 180 + "acute", "micro", "para", "middot", "cedil", + "sup1", "ordm", "raquo", "frac14", "frac12", - // 190 - "frac34", "iquest", "Agrave", "Aacute", "Acirc", - "Atilde", "Auml", "Aring", "AElig", "Ccedil", + // 190 + "frac34", "iquest", "Agrave", "Aacute", "Acirc", + "Atilde", "Auml", "Aring", "AElig", "Ccedil", - // 200 - "Egrave", "Eacute", "Ecirc", "Euml", "Igrave", - "Iacute", "Icirc", "Iuml", "ETH", "Ntilde", + // 200 + "Egrave", "Eacute", "Ecirc", "Euml", "Igrave", + "Iacute", "Icirc", "Iuml", "ETH", "Ntilde", - // 210 - "Ograve", "Oacute", "Ocirc", "Otilde", "Ouml", - "times", "Oslash", "Ugrave", "Uacute", "Ucirc", + // 210 + "Ograve", "Oacute", "Ocirc", "Otilde", "Ouml", + "times", "Oslash", "Ugrave", "Uacute", "Ucirc", - // 220 - "Uuml", "Yacute", "THORN", "szlig", "agrave", - "aacute", "acirc", "atilde", "auml", "aring", + // 220 + "Uuml", "Yacute", "THORN", "szlig", "agrave", + "aacute", "acirc", "atilde", "auml", "aring", - // 230 - "aelig", "ccedil", "egrave", "eacute", "ecirc", - "euml", "igrave", "iacute", "icirc", "iuml", + // 230 + "aelig", "ccedil", "egrave", "eacute", "ecirc", + "euml", "igrave", "iacute", "icirc", "iuml", - // 240 - "eth", "ntilde", "ograve", "oacute", "ocirc", - "otilde", "ouml", "divide", "oslash", "ugrave", + // 240 + "eth", "ntilde", "ograve", "oacute", "ocirc", + "otilde", "ouml", "divide", "oslash", "ugrave", - // 250 - "uacute", "ucirc", "uuml", "yacute", "thorn", - "yuml" + // 250 + "uacute", "ucirc", "uuml", "yacute", "thorn", + "yuml" }; // From "HTMLsymbolx.ent" ... some of the symbols that // we can conveniently handle. Entities for the Greek. // alphabet (upper and lower cases) are compact. private static final String HTMLsymbolx_GR [] = { - // 913 - "Alpha", "Beta", "Gamma", "Delta", "Epsilon", - "Zeta", "Eta", "Theta", "Iota", "Kappa", + // 913 + "Alpha", "Beta", "Gamma", "Delta", "Epsilon", + "Zeta", "Eta", "Theta", "Iota", "Kappa", - // 923 - "Lambda", "Mu", "Nu", "Xi", "Omicron", - "Pi", "Rho", null, "Sigma", "Tau", + // 923 + "Lambda", "Mu", "Nu", "Xi", "Omicron", + "Pi", "Rho", null, "Sigma", "Tau", - // 933 - "Upsilon", "Phi", "Chi", "Psi", "Omega" + // 933 + "Upsilon", "Phi", "Chi", "Psi", "Omega" }; private static final String HTMLsymbolx_gr [] = { - // 945 - "alpha", "beta", "gamma", "delta", "epsilon", - "zeta", "eta", "theta", "iota", "kappa", + // 945 + "alpha", "beta", "gamma", "delta", "epsilon", + "zeta", "eta", "theta", "iota", "kappa", - // 955 - "lambda", "mu", "nu", "xi", "omicron", - "pi", "rho", "sigmaf", "sigma", "tau", + // 955 + "lambda", "mu", "nu", "xi", "omicron", + "pi", "rho", "sigmaf", "sigma", "tau", - // 965 - "upsilon", "phi", "chi", "psi", "omega" + // 965 + "upsilon", "phi", "chi", "psi", "omega" }; @@ -1539,268 +1539,268 @@ public class XMLWriter private void escapeChars (char buf [], int off, int len, int code) throws SAXException, IOException { - int first = 0; - - if (off < 0) { - off = 0; - len = buf.length; - } - for (int i = 0; i < len; i++) { - String esc; - char c = buf [off + i]; - - switch (c) { - // Note that CTX_ATTRIBUTE isn't explicitly tested here; - // all syntax delimiters are escaped in CTX_ATTRIBUTE, - // otherwise it's similar to CTX_CONTENT - - // ampersand flags entity references; entity replacement - // text has unexpanded references, other text doesn't. - case '&': - if (code == CTX_ENTITY || code == CTX_UNPARSED) - continue; - esc = "amp"; - break; - - // attributes and text may NOT have literal '<', but - // entities may have markup constructs - case '<': - if (code == CTX_ENTITY || code == CTX_UNPARSED) - continue; - esc = "lt"; - break; - - // as above re markup constructs; but otherwise - // except when canonicalizing, this is for consistency - case '>': - if (code == CTX_ENTITY || code == CTX_UNPARSED) - continue; - esc = "gt"; - break; - case '\'': - if (code == CTX_CONTENT || code == CTX_UNPARSED) - continue; - if (canonical) - continue; - esc = "apos"; - break; - - // needed when printing quoted attribute/entity values - case '"': - if (code == CTX_CONTENT || code == CTX_UNPARSED) - continue; - esc = "quot"; - break; - - // make line ends work per host OS convention - case '\n': - esc = eol; - break; - - // - // No other characters NEED special treatment ... except - // for encoding-specific issues, like whether the character - // can really be represented in that encoding. - // - default: - // - // There are characters we can never write safely; getting - // them is an error. - // - // (a) They're never legal in XML ... detected by range - // checks, and (eventually) by remerging surrogate - // pairs on output. (Easy error for apps to prevent.) - // - // (b) This encoding can't represent them, and we - // can't make reference substitution (e.g. inside - // CDATA sections, names, PI data, etc). (Hard for - // apps to prevent, except by using UTF-8 or UTF-16 - // as their output encoding.) - // - // We know a very little bit about what characters - // the US-ASCII and ISO-8859-1 encodings support. For - // other encodings we can't detect the second type of - // error at all. (Never an issue for UTF-8 or UTF-16.) - // + int first = 0; + + if (off < 0) { + off = 0; + len = buf.length; + } + for (int i = 0; i < len; i++) { + String esc; + char c = buf [off + i]; + + switch (c) { + // Note that CTX_ATTRIBUTE isn't explicitly tested here; + // all syntax delimiters are escaped in CTX_ATTRIBUTE, + // otherwise it's similar to CTX_CONTENT + + // ampersand flags entity references; entity replacement + // text has unexpanded references, other text doesn't. + case '&': + if (code == CTX_ENTITY || code == CTX_UNPARSED) + continue; + esc = "amp"; + break; + + // attributes and text may NOT have literal '<', but + // entities may have markup constructs + case '<': + if (code == CTX_ENTITY || code == CTX_UNPARSED) + continue; + esc = "lt"; + break; + + // as above re markup constructs; but otherwise + // except when canonicalizing, this is for consistency + case '>': + if (code == CTX_ENTITY || code == CTX_UNPARSED) + continue; + esc = "gt"; + break; + case '\'': + if (code == CTX_CONTENT || code == CTX_UNPARSED) + continue; + if (canonical) + continue; + esc = "apos"; + break; + + // needed when printing quoted attribute/entity values + case '"': + if (code == CTX_CONTENT || code == CTX_UNPARSED) + continue; + esc = "quot"; + break; + + // make line ends work per host OS convention + case '\n': + esc = eol; + break; + + // + // No other characters NEED special treatment ... except + // for encoding-specific issues, like whether the character + // can really be represented in that encoding. + // + default: + // + // There are characters we can never write safely; getting + // them is an error. + // + // (a) They're never legal in XML ... detected by range + // checks, and (eventually) by remerging surrogate + // pairs on output. (Easy error for apps to prevent.) + // + // (b) This encoding can't represent them, and we + // can't make reference substitution (e.g. inside + // CDATA sections, names, PI data, etc). (Hard for + // apps to prevent, except by using UTF-8 or UTF-16 + // as their output encoding.) + // + // We know a very little bit about what characters + // the US-ASCII and ISO-8859-1 encodings support. For + // other encodings we can't detect the second type of + // error at all. (Never an issue for UTF-8 or UTF-16.) + // // FIXME: CR in CDATA is an error; in text, turn to a char ref // FIXME: CR/LF/TAB in attributes should become char refs - if ((c > 0xfffd) - || ((c < 0x0020) && !((c == 0x0009) - || (c == 0x000A) || (c == 0x000D))) - || (((c & dangerMask) != 0) - && (code == CTX_UNPARSED))) { - - // if case (b) in CDATA, we might end the section, - // write a reference, then restart ... possible - // in one DOM L3 draft. - - throw new CharConversionException ( - "Illegal or non-writable character: U+" - + Integer.toHexString (c)); - } - - // - // If the output encoding represents the character - // directly, let it do so! Else we'll escape it. - // - if ((c & dangerMask) == 0) - continue; - esc = null; - - // Avoid numeric refs where symbolic ones exist, as - // symbolic ones make more sense to humans reading! - if (xhtml) { - // all the HTMLlat1x.ent entities - // (all the "ISO-8859-1" characters) - if (c >= 160 && c <= 255) - esc = HTMLlat1x [c - 160]; - - // not quite half the HTMLsymbolx.ent entities - else if (c >= 913 && c <= 937) - esc = HTMLsymbolx_GR [c - 913]; - else if (c >= 945 && c <= 969) - esc = HTMLsymbolx_gr [c - 945]; - - else switch (c) { - // all of the HTMLspecialx.ent entities - case 338: esc = "OElig"; break; - case 339: esc = "oelig"; break; - case 352: esc = "Scaron"; break; - case 353: esc = "scaron"; break; - case 376: esc = "Yuml"; break; - case 710: esc = "circ"; break; - case 732: esc = "tilde"; break; - case 8194: esc = "ensp"; break; - case 8195: esc = "emsp"; break; - case 8201: esc = "thinsp"; break; - case 8204: esc = "zwnj"; break; - case 8205: esc = "zwj"; break; - case 8206: esc = "lrm"; break; - case 8207: esc = "rlm"; break; - case 8211: esc = "ndash"; break; - case 8212: esc = "mdash"; break; - case 8216: esc = "lsquo"; break; - case 8217: esc = "rsquo"; break; - case 8218: esc = "sbquo"; break; - case 8220: esc = "ldquo"; break; - case 8221: esc = "rdquo"; break; - case 8222: esc = "bdquo"; break; - case 8224: esc = "dagger"; break; - case 8225: esc = "Dagger"; break; - case 8240: esc = "permil"; break; - case 8249: esc = "lsaquo"; break; - case 8250: esc = "rsaquo"; break; - case 8364: esc = "euro"; break; - - // the other HTMLsymbox.ent entities - case 402: esc = "fnof"; break; - case 977: esc = "thetasym"; break; - case 978: esc = "upsih"; break; - case 982: esc = "piv"; break; - case 8226: esc = "bull"; break; - case 8230: esc = "hellip"; break; - case 8242: esc = "prime"; break; - case 8243: esc = "Prime"; break; - case 8254: esc = "oline"; break; - case 8260: esc = "frasl"; break; - case 8472: esc = "weierp"; break; - case 8465: esc = "image"; break; - case 8476: esc = "real"; break; - case 8482: esc = "trade"; break; - case 8501: esc = "alefsym"; break; - case 8592: esc = "larr"; break; - case 8593: esc = "uarr"; break; - case 8594: esc = "rarr"; break; - case 8595: esc = "darr"; break; - case 8596: esc = "harr"; break; - case 8629: esc = "crarr"; break; - case 8656: esc = "lArr"; break; - case 8657: esc = "uArr"; break; - case 8658: esc = "rArr"; break; - case 8659: esc = "dArr"; break; - case 8660: esc = "hArr"; break; - case 8704: esc = "forall"; break; - case 8706: esc = "part"; break; - case 8707: esc = "exist"; break; - case 8709: esc = "empty"; break; - case 8711: esc = "nabla"; break; - case 8712: esc = "isin"; break; - case 8713: esc = "notin"; break; - case 8715: esc = "ni"; break; - case 8719: esc = "prod"; break; - case 8721: esc = "sum"; break; - case 8722: esc = "minus"; break; - case 8727: esc = "lowast"; break; - case 8730: esc = "radic"; break; - case 8733: esc = "prop"; break; - case 8734: esc = "infin"; break; - case 8736: esc = "ang"; break; - case 8743: esc = "and"; break; - case 8744: esc = "or"; break; - case 8745: esc = "cap"; break; - case 8746: esc = "cup"; break; - case 8747: esc = "int"; break; - case 8756: esc = "there4"; break; - case 8764: esc = "sim"; break; - case 8773: esc = "cong"; break; - case 8776: esc = "asymp"; break; - case 8800: esc = "ne"; break; - case 8801: esc = "equiv"; break; - case 8804: esc = "le"; break; - case 8805: esc = "ge"; break; - case 8834: esc = "sub"; break; - case 8835: esc = "sup"; break; - case 8836: esc = "nsub"; break; - case 8838: esc = "sube"; break; - case 8839: esc = "supe"; break; - case 8853: esc = "oplus"; break; - case 8855: esc = "otimes"; break; - case 8869: esc = "perp"; break; - case 8901: esc = "sdot"; break; - case 8968: esc = "lceil"; break; - case 8969: esc = "rceil"; break; - case 8970: esc = "lfloor"; break; - case 8971: esc = "rfloor"; break; - case 9001: esc = "lang"; break; - case 9002: esc = "rang"; break; - case 9674: esc = "loz"; break; - case 9824: esc = "spades"; break; - case 9827: esc = "clubs"; break; - case 9829: esc = "hearts"; break; - case 9830: esc = "diams"; break; - } - } - - // else escape with numeric char refs - if (esc == null) { - stringBuf.setLength (0); - stringBuf.append ("#x"); - stringBuf.append (Integer.toHexString (c).toUpperCase ()); - esc = stringBuf.toString (); - - // FIXME: We don't write surrogate pairs correctly. - // They should work as one ref per character, since - // each pair is one character. For reading back into - // Unicode, it matters beginning in Unicode 3.1 ... - } - break; - } - if (i != first) - rawWrite (buf, off + first, i - first); - first = i + 1; - if (esc == eol) - newline (); - else { - rawWrite ('&'); - rawWrite (esc); - rawWrite (';'); - } - } - if (first < len) - rawWrite (buf, off + first, len - first); + if ((c > 0xfffd) + || ((c < 0x0020) && !((c == 0x0009) + || (c == 0x000A) || (c == 0x000D))) + || (((c & dangerMask) != 0) + && (code == CTX_UNPARSED))) { + + // if case (b) in CDATA, we might end the section, + // write a reference, then restart ... possible + // in one DOM L3 draft. + + throw new CharConversionException ( + "Illegal or non-writable character: U+" + + Integer.toHexString (c)); + } + + // + // If the output encoding represents the character + // directly, let it do so! Else we'll escape it. + // + if ((c & dangerMask) == 0) + continue; + esc = null; + + // Avoid numeric refs where symbolic ones exist, as + // symbolic ones make more sense to humans reading! + if (xhtml) { + // all the HTMLlat1x.ent entities + // (all the "ISO-8859-1" characters) + if (c >= 160 && c <= 255) + esc = HTMLlat1x [c - 160]; + + // not quite half the HTMLsymbolx.ent entities + else if (c >= 913 && c <= 937) + esc = HTMLsymbolx_GR [c - 913]; + else if (c >= 945 && c <= 969) + esc = HTMLsymbolx_gr [c - 945]; + + else switch (c) { + // all of the HTMLspecialx.ent entities + case 338: esc = "OElig"; break; + case 339: esc = "oelig"; break; + case 352: esc = "Scaron"; break; + case 353: esc = "scaron"; break; + case 376: esc = "Yuml"; break; + case 710: esc = "circ"; break; + case 732: esc = "tilde"; break; + case 8194: esc = "ensp"; break; + case 8195: esc = "emsp"; break; + case 8201: esc = "thinsp"; break; + case 8204: esc = "zwnj"; break; + case 8205: esc = "zwj"; break; + case 8206: esc = "lrm"; break; + case 8207: esc = "rlm"; break; + case 8211: esc = "ndash"; break; + case 8212: esc = "mdash"; break; + case 8216: esc = "lsquo"; break; + case 8217: esc = "rsquo"; break; + case 8218: esc = "sbquo"; break; + case 8220: esc = "ldquo"; break; + case 8221: esc = "rdquo"; break; + case 8222: esc = "bdquo"; break; + case 8224: esc = "dagger"; break; + case 8225: esc = "Dagger"; break; + case 8240: esc = "permil"; break; + case 8249: esc = "lsaquo"; break; + case 8250: esc = "rsaquo"; break; + case 8364: esc = "euro"; break; + + // the other HTMLsymbox.ent entities + case 402: esc = "fnof"; break; + case 977: esc = "thetasym"; break; + case 978: esc = "upsih"; break; + case 982: esc = "piv"; break; + case 8226: esc = "bull"; break; + case 8230: esc = "hellip"; break; + case 8242: esc = "prime"; break; + case 8243: esc = "Prime"; break; + case 8254: esc = "oline"; break; + case 8260: esc = "frasl"; break; + case 8472: esc = "weierp"; break; + case 8465: esc = "image"; break; + case 8476: esc = "real"; break; + case 8482: esc = "trade"; break; + case 8501: esc = "alefsym"; break; + case 8592: esc = "larr"; break; + case 8593: esc = "uarr"; break; + case 8594: esc = "rarr"; break; + case 8595: esc = "darr"; break; + case 8596: esc = "harr"; break; + case 8629: esc = "crarr"; break; + case 8656: esc = "lArr"; break; + case 8657: esc = "uArr"; break; + case 8658: esc = "rArr"; break; + case 8659: esc = "dArr"; break; + case 8660: esc = "hArr"; break; + case 8704: esc = "forall"; break; + case 8706: esc = "part"; break; + case 8707: esc = "exist"; break; + case 8709: esc = "empty"; break; + case 8711: esc = "nabla"; break; + case 8712: esc = "isin"; break; + case 8713: esc = "notin"; break; + case 8715: esc = "ni"; break; + case 8719: esc = "prod"; break; + case 8721: esc = "sum"; break; + case 8722: esc = "minus"; break; + case 8727: esc = "lowast"; break; + case 8730: esc = "radic"; break; + case 8733: esc = "prop"; break; + case 8734: esc = "infin"; break; + case 8736: esc = "ang"; break; + case 8743: esc = "and"; break; + case 8744: esc = "or"; break; + case 8745: esc = "cap"; break; + case 8746: esc = "cup"; break; + case 8747: esc = "int"; break; + case 8756: esc = "there4"; break; + case 8764: esc = "sim"; break; + case 8773: esc = "cong"; break; + case 8776: esc = "asymp"; break; + case 8800: esc = "ne"; break; + case 8801: esc = "equiv"; break; + case 8804: esc = "le"; break; + case 8805: esc = "ge"; break; + case 8834: esc = "sub"; break; + case 8835: esc = "sup"; break; + case 8836: esc = "nsub"; break; + case 8838: esc = "sube"; break; + case 8839: esc = "supe"; break; + case 8853: esc = "oplus"; break; + case 8855: esc = "otimes"; break; + case 8869: esc = "perp"; break; + case 8901: esc = "sdot"; break; + case 8968: esc = "lceil"; break; + case 8969: esc = "rceil"; break; + case 8970: esc = "lfloor"; break; + case 8971: esc = "rfloor"; break; + case 9001: esc = "lang"; break; + case 9002: esc = "rang"; break; + case 9674: esc = "loz"; break; + case 9824: esc = "spades"; break; + case 9827: esc = "clubs"; break; + case 9829: esc = "hearts"; break; + case 9830: esc = "diams"; break; + } + } + + // else escape with numeric char refs + if (esc == null) { + stringBuf.setLength (0); + stringBuf.append ("#x"); + stringBuf.append (Integer.toHexString (c).toUpperCase ()); + esc = stringBuf.toString (); + + // FIXME: We don't write surrogate pairs correctly. + // They should work as one ref per character, since + // each pair is one character. For reading back into + // Unicode, it matters beginning in Unicode 3.1 ... + } + break; + } + if (i != first) + rawWrite (buf, off + first, i - first); + first = i + 1; + if (esc == eol) + newline (); + else { + rawWrite ('&'); + rawWrite (esc); + rawWrite (';'); + } + } + if (first < len) + rawWrite (buf, off + first, len - first); } @@ -1808,45 +1808,45 @@ public class XMLWriter private void newline () throws SAXException, IOException { - out.write (eol); - column = 0; + out.write (eol); + column = 0; } private void doIndent () throws SAXException, IOException { - int space = elementNestLevel * 2; - - newline (); - column = space; - // track tabs only at line starts - while (space > 8) { - out.write ("\t"); - space -= 8; - } - while (space > 0) { - out.write (" "); - space -= 2; - } + int space = elementNestLevel * 2; + + newline (); + column = space; + // track tabs only at line starts + while (space > 8) { + out.write ("\t"); + space -= 8; + } + while (space > 0) { + out.write (" "); + space -= 2; + } } private void rawWrite (char c) throws IOException { - out.write (c); - column++; + out.write (c); + column++; } private void rawWrite (String s) throws SAXException, IOException { - if (prettyPrinting && "default".equals (space.peek ())) { - char data [] = s.toCharArray (); - rawWrite (data, 0, data.length); - } else { - out.write (s); - column += s.length (); - } + if (prettyPrinting && "default".equals (space.peek ())) { + char data [] = s.toCharArray (); + rawWrite (data, 0, data.length); + } else { + out.write (s); + column += s.length (); + } } // NOTE: if xhtml, the REC gives some rules about whitespace @@ -1862,70 +1862,70 @@ public class XMLWriter private void rawWrite (char buf [], int offset, int length) throws SAXException, IOException { - boolean wrap; - - if (prettyPrinting && space.empty ()) - fatal ("stack discipline", null); - - wrap = prettyPrinting && "default".equals (space.peek ()); - if (!wrap) { - out.write (buf, offset, length); - column += length; - return; - } - - // we're pretty printing and want to fill lines out only - // to the desired line length. - while (length > 0) { - int target = lineLength - column; - boolean wrote = false; - - // Do we even have a problem? - if (target > length || noWrap) { - out.write (buf, offset, length); - column += length; - return; - } - - // break the line at a space character, trying to fill - // as much of the line as possible. - char c; - - for (int i = target - 1; i >= 0; i--) { - if ((c = buf [offset + i]) == ' ' || c == '\t') { - i++; - out.write (buf, offset, i); - doIndent (); - offset += i; - length -= i; - wrote = true; - break; - } - } - if (wrote) - continue; - - // no space character permitting break before target - // line length is filled. So, take the next one. - if (target < 0) - target = 0; - for (int i = target; i < length; i++) - if ((c = buf [offset + i]) == ' ' || c == '\t') { - i++; - out.write (buf, offset, i); - doIndent (); - offset += i; - length -= i; - wrote = true; - break; - } - if (wrote) - continue; - - // no such luck. - out.write (buf, offset, length); - column += length; - break; - } + boolean wrap; + + if (prettyPrinting && space.empty ()) + fatal ("stack discipline", null); + + wrap = prettyPrinting && "default".equals (space.peek ()); + if (!wrap) { + out.write (buf, offset, length); + column += length; + return; + } + + // we're pretty printing and want to fill lines out only + // to the desired line length. + while (length > 0) { + int target = lineLength - column; + boolean wrote = false; + + // Do we even have a problem? + if (target > length || noWrap) { + out.write (buf, offset, length); + column += length; + return; + } + + // break the line at a space character, trying to fill + // as much of the line as possible. + char c; + + for (int i = target - 1; i >= 0; i--) { + if ((c = buf [offset + i]) == ' ' || c == '\t') { + i++; + out.write (buf, offset, i); + doIndent (); + offset += i; + length -= i; + wrote = true; + break; + } + } + if (wrote) + continue; + + // no space character permitting break before target + // line length is filled. So, take the next one. + if (target < 0) + target = 0; + for (int i = target; i < length; i++) + if ((c = buf [offset + i]) == ' ' || c == '\t') { + i++; + out.write (buf, offset, i); + doIndent (); + offset += i; + length -= i; + wrote = true; + break; + } + if (wrote) + continue; + + // no such luck. + out.write (buf, offset, length); + column += length; + break; + } } } diff --git a/libjava/classpath/gnu/xml/validation/datatype/Annotation.java b/libjava/classpath/gnu/xml/validation/datatype/Annotation.java index cba6954..6438e2e 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/Annotation.java +++ b/libjava/classpath/gnu/xml/validation/datatype/Annotation.java @@ -1,4 +1,4 @@ -/* Annotation.java -- +/* Annotation.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -56,6 +56,5 @@ public class Annotation { return documentation; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/AnySimpleType.java b/libjava/classpath/gnu/xml/validation/datatype/AnySimpleType.java index 63441c7..36fb98d 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/AnySimpleType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/AnySimpleType.java @@ -1,4 +1,4 @@ -/* AnySimpleType.java -- +/* AnySimpleType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -44,7 +44,7 @@ import javax.xml.namespace.QName; final class AnySimpleType extends SimpleType { - + AnySimpleType() { super(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "anySimpleType"), @@ -56,4 +56,3 @@ final class AnySimpleType } } - diff --git a/libjava/classpath/gnu/xml/validation/datatype/AnyType.java b/libjava/classpath/gnu/xml/validation/datatype/AnyType.java index f26a075..2a3f116 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/AnyType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/AnyType.java @@ -1,4 +1,4 @@ -/* AnyType.java -- +/* AnyType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -43,7 +43,7 @@ import javax.xml.namespace.QName; final class AnyType extends SimpleType { - + AnyType() { super(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "anyType"), @@ -55,4 +55,3 @@ final class AnyType } } - diff --git a/libjava/classpath/gnu/xml/validation/datatype/AnyURIType.java b/libjava/classpath/gnu/xml/validation/datatype/AnyURIType.java index 56c0a06..ef409b9 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/AnyURIType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/AnyURIType.java @@ -1,4 +1,4 @@ -/* AnyURIType.java -- +/* AnyURIType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -89,6 +89,5 @@ final class AnyURIType throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/AtomicSimpleType.java b/libjava/classpath/gnu/xml/validation/datatype/AtomicSimpleType.java index d685e5c..38528ee 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/AtomicSimpleType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/AtomicSimpleType.java @@ -1,4 +1,4 @@ -/* AtomicSimpleType.java -- +/* AtomicSimpleType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,7 +50,7 @@ import org.relaxng.datatype.ValidationContext; public class AtomicSimpleType extends SimpleType { - + public AtomicSimpleType(QName name, Set facets, int fundamentalFacets, @@ -73,6 +73,5 @@ public class AtomicSimpleType if (baseType != null) baseType.checkValid(value, context); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/Base64BinaryType.java b/libjava/classpath/gnu/xml/validation/datatype/Base64BinaryType.java index 2fc4c33..3f3442f 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/Base64BinaryType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/Base64BinaryType.java @@ -1,4 +1,4 @@ -/* Base64BinaryType.java -- +/* Base64BinaryType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -98,7 +98,7 @@ final class Base64BinaryType char c1 = value.charAt(i--); if (c1 == ' ') c1 = value.charAt(i--); - + if (c4 == '=') { if (c3 == '=') @@ -124,6 +124,5 @@ final class Base64BinaryType throw new DatatypeException("illegal BASE64"); } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/BooleanType.java b/libjava/classpath/gnu/xml/validation/datatype/BooleanType.java index 25e488a..5d98d24 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/BooleanType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/BooleanType.java @@ -1,4 +1,4 @@ -/* BooleanType.java -- +/* BooleanType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -80,11 +80,10 @@ final class BooleanType if (!VALUE_SPACE.contains(value)) throw new DatatypeException("invalid boolean value"); } - + public Object createValue(String literal, ValidationContext context) { return ("1".equals(literal) || "true".equals(literal)) ? Boolean.TRUE : Boolean.FALSE; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/ByteType.java b/libjava/classpath/gnu/xml/validation/datatype/ByteType.java index 539dba2..9bce45b 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/ByteType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/ByteType.java @@ -1,4 +1,4 @@ -/* ByteType.java -- +/* ByteType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -117,7 +117,7 @@ final class ByteType throw new DatatypeException(i, "invalid byte value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -128,6 +128,5 @@ final class ByteType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/DateTimeType.java b/libjava/classpath/gnu/xml/validation/datatype/DateTimeType.java index 749ba81..81d2785 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/DateTimeType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/DateTimeType.java @@ -1,4 +1,4 @@ -/* DateTimeType.java -- +/* DateTimeType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -213,7 +213,7 @@ final class DateTimeType throw new DatatypeException(len, "invalid dateTime value"); } } - + public Object createValue(String value, ValidationContext context) { int len = value.length(); int state = 0; @@ -330,6 +330,5 @@ final class DateTimeType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/DateType.java b/libjava/classpath/gnu/xml/validation/datatype/DateType.java index 6a4e1d7..8e6e3c3 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/DateType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/DateType.java @@ -1,4 +1,4 @@ -/* DateType.java -- +/* DateType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -128,7 +128,7 @@ final class DateType throw new DatatypeException("invalid date value"); } } - + public Object createValue(String value, ValidationContext context) { int len = value.length(); int state = 0; @@ -217,6 +217,5 @@ final class DateType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/DecimalType.java b/libjava/classpath/gnu/xml/validation/datatype/DecimalType.java index b895c44..43a26a3 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/DecimalType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/DecimalType.java @@ -1,4 +1,4 @@ -/* DecimalType.java -- +/* DecimalType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -103,7 +103,7 @@ final class DecimalType throw new DatatypeException(i, "invalid decimal value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -114,6 +114,5 @@ final class DecimalType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/DoubleType.java b/libjava/classpath/gnu/xml/validation/datatype/DoubleType.java index 5d2d866..dfaa7c8 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/DoubleType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/DoubleType.java @@ -1,4 +1,4 @@ -/* DoubleType.java -- +/* DoubleType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -95,7 +95,7 @@ final class DoubleType throw e2; } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -106,6 +106,5 @@ final class DoubleType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/DurationType.java b/libjava/classpath/gnu/xml/validation/datatype/DurationType.java index 2cb92ba..6c0f7b8 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/DurationType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/DurationType.java @@ -1,4 +1,4 @@ -/* DurationType.java -- +/* DurationType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -103,7 +103,7 @@ final class DurationType } return 0; } - + } static final int[] CONSTRAINING_FACETS = { @@ -170,7 +170,7 @@ final class DurationType throw new DatatypeException(i, "illegal duration value"); } } - + public Object createValue(String value, ValidationContext context) { boolean negative = false; int days = 0, months = 0, years = 0; @@ -236,4 +236,3 @@ final class DurationType } } - diff --git a/libjava/classpath/gnu/xml/validation/datatype/EntitiesType.java b/libjava/classpath/gnu/xml/validation/datatype/EntitiesType.java index d16106e..5415e88 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/EntitiesType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/EntitiesType.java @@ -1,4 +1,4 @@ -/* EntitiesType.java -- +/* EntitiesType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -104,6 +104,5 @@ final class EntitiesType { return true; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/EntityType.java b/libjava/classpath/gnu/xml/validation/datatype/EntityType.java index f1443bc..f4a10bd 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/EntityType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/EntityType.java @@ -1,4 +1,4 @@ -/* EntityType.java -- +/* EntityType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -83,6 +83,5 @@ final class EntityType { return true; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/EnumerationFacet.java b/libjava/classpath/gnu/xml/validation/datatype/EnumerationFacet.java index 0ad3d3f..45b9c23 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/EnumerationFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/EnumerationFacet.java @@ -1,4 +1,4 @@ -/* EnumerationFacet.java -- +/* EnumerationFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,7 +45,7 @@ package gnu.xml.validation.datatype; public final class EnumerationFacet extends Facet { - + public final String value; public EnumerationFacet(String value, Annotation annotation) @@ -64,6 +64,5 @@ public final class EnumerationFacet return (other instanceof EnumerationFacet && ((EnumerationFacet) other).value.equals(value)); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/Facet.java b/libjava/classpath/gnu/xml/validation/datatype/Facet.java index 490abf8..9f18bed 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/Facet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/Facet.java @@ -1,4 +1,4 @@ -/* Facet.java -- +/* Facet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -73,6 +73,5 @@ public abstract class Facet this.type = type; this.annotation = annotation; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/FloatType.java b/libjava/classpath/gnu/xml/validation/datatype/FloatType.java index 372e388..8dbb4aa 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/FloatType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/FloatType.java @@ -1,4 +1,4 @@ -/* FloatType.java -- +/* FloatType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -95,7 +95,7 @@ final class FloatType throw e2; } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -106,6 +106,5 @@ final class FloatType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/FractionDigitsFacet.java b/libjava/classpath/gnu/xml/validation/datatype/FractionDigitsFacet.java index efd9862..c0d7145 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/FractionDigitsFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/FractionDigitsFacet.java @@ -1,4 +1,4 @@ -/* FractionDigitsFacet.java -- +/* FractionDigitsFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,7 +45,7 @@ package gnu.xml.validation.datatype; public final class FractionDigitsFacet extends Facet { - + public final int value; public final boolean fixed; @@ -56,7 +56,7 @@ public final class FractionDigitsFacet this.value = value; this.fixed = fixed; } - + public int hashCode() { return value; @@ -67,6 +67,5 @@ public final class FractionDigitsFacet return (other instanceof FractionDigitsFacet && ((FractionDigitsFacet) other).value == value); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/GDayType.java b/libjava/classpath/gnu/xml/validation/datatype/GDayType.java index 009af35..cc6b8e3 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/GDayType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/GDayType.java @@ -1,4 +1,4 @@ -/* GDayType.java -- +/* GDayType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -80,7 +80,7 @@ final class GDayType } return 0; } - + } static final int[] CONSTRAINING_FACETS = { @@ -157,7 +157,7 @@ final class GDayType throw new DatatypeException("invalid GDay value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -170,6 +170,5 @@ final class GDayType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/GMonthDayType.java b/libjava/classpath/gnu/xml/validation/datatype/GMonthDayType.java index a39a1cc..d293d9b 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/GMonthDayType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/GMonthDayType.java @@ -1,4 +1,4 @@ -/* GMonthDayType.java -- +/* GMonthDayType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -88,7 +88,7 @@ final class GMonthDayType } return 0; } - + } static final int[] CONSTRAINING_FACETS = { @@ -165,7 +165,7 @@ final class GMonthDayType throw new DatatypeException("illegal GMonthDay type"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -179,6 +179,5 @@ final class GMonthDayType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/GMonthType.java b/libjava/classpath/gnu/xml/validation/datatype/GMonthType.java index 5a08af2..9450874 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/GMonthType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/GMonthType.java @@ -1,4 +1,4 @@ -/* GMonthType.java -- +/* GMonthType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -80,7 +80,7 @@ final class GMonthType } return 0; } - + } static final int[] CONSTRAINING_FACETS = { @@ -146,7 +146,7 @@ final class GMonthType throw new DatatypeException("illegal GMonth value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -159,6 +159,5 @@ final class GMonthType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/GYearMonthType.java b/libjava/classpath/gnu/xml/validation/datatype/GYearMonthType.java index 9ec38c0..9aabfb6 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/GYearMonthType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/GYearMonthType.java @@ -1,4 +1,4 @@ -/* GYearMonthType.java -- +/* GYearMonthType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -88,7 +88,7 @@ final class GYearMonthType } return 0; } - + } static final int[] CONSTRAINING_FACETS = { @@ -155,7 +155,7 @@ final class GYearMonthType throw new DatatypeException("illegal GYear value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -172,6 +172,5 @@ final class GYearMonthType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/GYearType.java b/libjava/classpath/gnu/xml/validation/datatype/GYearType.java index 6dea89b..5b1e03232 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/GYearType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/GYearType.java @@ -1,4 +1,4 @@ -/* GYearType.java -- +/* GYearType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -80,7 +80,7 @@ final class GYearType } return 0; } - + } static final int[] CONSTRAINING_FACETS = { @@ -134,7 +134,7 @@ final class GYearType throw new DatatypeException("invalid GYear value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -147,6 +147,5 @@ final class GYearType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/HexBinaryType.java b/libjava/classpath/gnu/xml/validation/datatype/HexBinaryType.java index 8a92b15..5f133e3 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/HexBinaryType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/HexBinaryType.java @@ -1,4 +1,4 @@ -/* HexBinaryType.java -- +/* HexBinaryType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -85,6 +85,5 @@ final class HexBinaryType throw new DatatypeException(i, "invalid hexBinary value"); } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/IDRefType.java b/libjava/classpath/gnu/xml/validation/datatype/IDRefType.java index 8ea9805..9320895 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/IDRefType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/IDRefType.java @@ -1,4 +1,4 @@ -/* IDRefType.java -- +/* IDRefType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -82,6 +82,5 @@ final class IDRefType { return ID_TYPE_IDREF; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/IDRefsType.java b/libjava/classpath/gnu/xml/validation/datatype/IDRefsType.java index 57f7e56..6adaed1 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/IDRefsType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/IDRefsType.java @@ -1,4 +1,4 @@ -/* IDRefsType.java -- +/* IDRefsType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -82,6 +82,5 @@ final class IDRefsType { return ID_TYPE_IDREFS; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/IDType.java b/libjava/classpath/gnu/xml/validation/datatype/IDType.java index c55601a..792601d 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/IDType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/IDType.java @@ -1,4 +1,4 @@ -/* IDType.java -- +/* IDType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -82,6 +82,5 @@ final class IDType { return ID_TYPE_ID; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/IntType.java b/libjava/classpath/gnu/xml/validation/datatype/IntType.java index 6bf7866..c8f7568 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/IntType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/IntType.java @@ -1,4 +1,4 @@ -/* IntType.java -- +/* IntType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -117,7 +117,7 @@ final class IntType throw new DatatypeException(i, "invalid int value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -128,6 +128,5 @@ final class IntType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/IntegerType.java b/libjava/classpath/gnu/xml/validation/datatype/IntegerType.java index 2098a7d..b9a2a56 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/IntegerType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/IntegerType.java @@ -1,4 +1,4 @@ -/* IntegerType.java -- +/* IntegerType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,7 +94,7 @@ final class IntegerType throw new DatatypeException(i, "invalid integer value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -105,6 +105,5 @@ final class IntegerType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/LanguageType.java b/libjava/classpath/gnu/xml/validation/datatype/LanguageType.java index 3df903c..d30cc53 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/LanguageType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/LanguageType.java @@ -1,4 +1,4 @@ -/* LanguageType.java -- +/* LanguageType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -82,6 +82,5 @@ final class LanguageType if (!PATTERN.matcher(value).matches()) throw new DatatypeException("invalid language value"); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/LengthFacet.java b/libjava/classpath/gnu/xml/validation/datatype/LengthFacet.java index cab4496..d6eaacd 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/LengthFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/LengthFacet.java @@ -1,4 +1,4 @@ -/* LengthFacet.java -- +/* LengthFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,7 +45,7 @@ package gnu.xml.validation.datatype; public final class LengthFacet extends Facet { - + public final int value; public final boolean fixed; @@ -56,7 +56,7 @@ public final class LengthFacet this.value = value; this.fixed = fixed; } - + public int hashCode() { return value; @@ -67,6 +67,5 @@ public final class LengthFacet return (other instanceof LengthFacet && ((LengthFacet) other).value == value); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/ListSimpleType.java b/libjava/classpath/gnu/xml/validation/datatype/ListSimpleType.java index 1f0cb76..1e0d41d 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/ListSimpleType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/ListSimpleType.java @@ -1,4 +1,4 @@ -/* ListSimpleType.java -- +/* ListSimpleType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -56,7 +56,7 @@ public class ListSimpleType * The type of the items in this list (atomic or union). */ public final SimpleType itemType; - + public ListSimpleType(QName name, Set facets, int fundamentalFacets, SimpleType baseType, Annotation annotation, SimpleType itemType) @@ -64,7 +64,7 @@ public class ListSimpleType super(name, LIST, facets, fundamentalFacets, baseType, annotation); this.itemType = itemType; } - + public void checkValid(String value, ValidationContext context) throws DatatypeException { @@ -78,6 +78,5 @@ public class ListSimpleType itemType.checkValid(token, context); } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/LongType.java b/libjava/classpath/gnu/xml/validation/datatype/LongType.java index eaf69df..781b17f 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/LongType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/LongType.java @@ -1,4 +1,4 @@ -/* LongType.java -- +/* LongType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -117,7 +117,7 @@ final class LongType throw new DatatypeException(i, "invalid long value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -128,6 +128,5 @@ final class LongType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/MaxExclusiveFacet.java b/libjava/classpath/gnu/xml/validation/datatype/MaxExclusiveFacet.java index 7aac1f7..90e9403 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/MaxExclusiveFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/MaxExclusiveFacet.java @@ -1,4 +1,4 @@ -/* MaxExclusiveFacet.java -- +/* MaxExclusiveFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,7 +49,7 @@ import java.util.Date; public final class MaxExclusiveFacet extends Facet { - + public final Object value; // date or number public final boolean fixed; @@ -60,7 +60,7 @@ public final class MaxExclusiveFacet this.value = value; this.fixed = fixed; } - + public int hashCode() { return value.hashCode(); @@ -106,6 +106,5 @@ public final class MaxExclusiveFacet return false; return ((Number) test).doubleValue() < nvalue.doubleValue(); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/MaxInclusiveFacet.java b/libjava/classpath/gnu/xml/validation/datatype/MaxInclusiveFacet.java index bb145ed..c260113 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/MaxInclusiveFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/MaxInclusiveFacet.java @@ -1,4 +1,4 @@ -/* MaxInclusiveFacet.java -- +/* MaxInclusiveFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,7 +49,7 @@ import java.util.Date; public final class MaxInclusiveFacet extends Facet { - + public final Object value; public final boolean fixed; @@ -60,7 +60,7 @@ public final class MaxInclusiveFacet this.value = value; this.fixed = fixed; } - + public int hashCode() { return value.hashCode(); @@ -71,7 +71,7 @@ public final class MaxInclusiveFacet return (other instanceof MaxInclusiveFacet && ((MaxInclusiveFacet) other).value.equals(value)); } - + boolean matches(Object test) { if (value instanceof Date) @@ -107,6 +107,5 @@ public final class MaxInclusiveFacet return false; return ((Number) test).doubleValue() <= nvalue.doubleValue(); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/MaxLengthFacet.java b/libjava/classpath/gnu/xml/validation/datatype/MaxLengthFacet.java index d033263..ba77ff2 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/MaxLengthFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/MaxLengthFacet.java @@ -1,4 +1,4 @@ -/* MaxLengthFacet.java -- +/* MaxLengthFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -67,6 +67,5 @@ public final class MaxLengthFacet return (other instanceof MaxLengthFacet && ((MaxLengthFacet) other).value == value); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/MinExclusiveFacet.java b/libjava/classpath/gnu/xml/validation/datatype/MinExclusiveFacet.java index 2289bb1..a779d09 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/MinExclusiveFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/MinExclusiveFacet.java @@ -1,4 +1,4 @@ -/* MinExclusiveFacet.java -- +/* MinExclusiveFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,7 +49,7 @@ import java.util.Date; public final class MinExclusiveFacet extends Facet { - + public final Object value; public final boolean fixed; @@ -60,7 +60,7 @@ public final class MinExclusiveFacet this.value = value; this.fixed = fixed; } - + public int hashCode() { return value.hashCode(); @@ -71,7 +71,7 @@ public final class MinExclusiveFacet return (other instanceof MinExclusiveFacet && ((MinExclusiveFacet) other).value.equals(value)); } - + boolean matches(Object test) { if (value instanceof Date) @@ -106,6 +106,5 @@ public final class MinExclusiveFacet return false; return ((Number) test).doubleValue() > nvalue.doubleValue(); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/MinInclusiveFacet.java b/libjava/classpath/gnu/xml/validation/datatype/MinInclusiveFacet.java index 6c07c36..6138c9a 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/MinInclusiveFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/MinInclusiveFacet.java @@ -1,4 +1,4 @@ -/* MinInclusiveFacet.java -- +/* MinInclusiveFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,7 +49,7 @@ import java.util.Date; public final class MinInclusiveFacet extends Facet { - + public final Object value; public final boolean fixed; @@ -60,7 +60,7 @@ public final class MinInclusiveFacet this.value = value; this.fixed = fixed; } - + public int hashCode() { return value.hashCode(); @@ -71,7 +71,7 @@ public final class MinInclusiveFacet return (other instanceof MinInclusiveFacet && ((MinInclusiveFacet) other).value.equals(value)); } - + boolean matches(Object test) { if (value instanceof Date) @@ -107,6 +107,5 @@ public final class MinInclusiveFacet return false; return ((Number) test).doubleValue() >= nvalue.doubleValue(); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/MinLengthFacet.java b/libjava/classpath/gnu/xml/validation/datatype/MinLengthFacet.java index c7dee20..f13e80b 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/MinLengthFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/MinLengthFacet.java @@ -1,4 +1,4 @@ -/* MinLengthFacet.java -- +/* MinLengthFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -67,6 +67,5 @@ public final class MinLengthFacet return (other instanceof MinLengthFacet && ((MinLengthFacet) other).value == value); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/NCNameType.java b/libjava/classpath/gnu/xml/validation/datatype/NCNameType.java index 4188d88..3f2088f 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/NCNameType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/NCNameType.java @@ -1,4 +1,4 @@ -/* NCNameType.java -- +/* NCNameType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -106,6 +106,5 @@ final class NCNameType throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/NMTokenType.java b/libjava/classpath/gnu/xml/validation/datatype/NMTokenType.java index 4498fec..ca3271f 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/NMTokenType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/NMTokenType.java @@ -1,4 +1,4 @@ -/* NMTokenType.java -- +/* NMTokenType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -97,6 +97,5 @@ final class NMTokenType throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/NMTokensType.java b/libjava/classpath/gnu/xml/validation/datatype/NMTokensType.java index d499645..388b451 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/NMTokensType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/NMTokensType.java @@ -1,4 +1,4 @@ -/* NMTokensType.java -- +/* NMTokensType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -120,7 +120,6 @@ final class NMTokensType throw e2; } } - - -} + +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/NameType.java b/libjava/classpath/gnu/xml/validation/datatype/NameType.java index a2fbb9d..70349ae 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/NameType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/NameType.java @@ -1,4 +1,4 @@ -/* NameType.java -- +/* NameType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -99,6 +99,5 @@ final class NameType throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/NegativeIntegerType.java b/libjava/classpath/gnu/xml/validation/datatype/NegativeIntegerType.java index fd436cb..1e6439c 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/NegativeIntegerType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/NegativeIntegerType.java @@ -1,4 +1,4 @@ -/* NegativeIntegerType.java -- +/* NegativeIntegerType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -95,7 +95,7 @@ final class NegativeIntegerType throw new DatatypeException(i, "invalid negative integer value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -106,6 +106,5 @@ final class NegativeIntegerType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/NonNegativeIntegerType.java b/libjava/classpath/gnu/xml/validation/datatype/NonNegativeIntegerType.java index 8577785..c5192f3 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/NonNegativeIntegerType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/NonNegativeIntegerType.java @@ -1,4 +1,4 @@ -/* NonNegativeIntegerType.java -- +/* NonNegativeIntegerType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -105,7 +105,7 @@ final class NonNegativeIntegerType throw new DatatypeException(i, "invalid non-negative integer value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -116,6 +116,5 @@ final class NonNegativeIntegerType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/NonPositiveIntegerType.java b/libjava/classpath/gnu/xml/validation/datatype/NonPositiveIntegerType.java index 0b43d52..e418c06 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/NonPositiveIntegerType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/NonPositiveIntegerType.java @@ -1,4 +1,4 @@ -/* NonPositiveIntegerType.java -- +/* NonPositiveIntegerType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -105,7 +105,7 @@ final class NonPositiveIntegerType throw new DatatypeException(i, "invalid non-positive integer value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -116,6 +116,5 @@ final class NonPositiveIntegerType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/NormalizedStringType.java b/libjava/classpath/gnu/xml/validation/datatype/NormalizedStringType.java index a74312d..9009f64 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/NormalizedStringType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/NormalizedStringType.java @@ -1,4 +1,4 @@ -/* NormalizedStringType.java -- +/* NormalizedStringType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -83,6 +83,5 @@ final class NormalizedStringType throw new DatatypeException(i, "invalid normalized-string value"); } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/NotationType.java b/libjava/classpath/gnu/xml/validation/datatype/NotationType.java index e9d7c9f..b661cb4 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/NotationType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/NotationType.java @@ -1,4 +1,4 @@ -/* NotationType.java -- +/* NotationType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -83,6 +83,5 @@ final class NotationType { return true; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/PatternFacet.java b/libjava/classpath/gnu/xml/validation/datatype/PatternFacet.java index d594b26b..9c1cb7e 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/PatternFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/PatternFacet.java @@ -1,4 +1,4 @@ -/* PatternFacet.java -- +/* PatternFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -66,6 +66,5 @@ public final class PatternFacet return (other instanceof PatternFacet && ((PatternFacet) other).value.equals(value)); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/PositiveIntegerType.java b/libjava/classpath/gnu/xml/validation/datatype/PositiveIntegerType.java index 0c10df3..15d0feb 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/PositiveIntegerType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/PositiveIntegerType.java @@ -1,4 +1,4 @@ -/* PositiveIntegerType.java -- +/* PositiveIntegerType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -95,7 +95,7 @@ final class PositiveIntegerType throw new DatatypeException(i, "invalid positive integer value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -106,6 +106,5 @@ final class PositiveIntegerType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/QNameType.java b/libjava/classpath/gnu/xml/validation/datatype/QNameType.java index 1eaa518..bdc40c9 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/QNameType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/QNameType.java @@ -1,4 +1,4 @@ -/* QNameType.java -- +/* QNameType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -117,6 +117,5 @@ final class QNameType { return true; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/ShortType.java b/libjava/classpath/gnu/xml/validation/datatype/ShortType.java index 3179c8d..4325557 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/ShortType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/ShortType.java @@ -1,4 +1,4 @@ -/* ShortType.java -- +/* ShortType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -117,7 +117,7 @@ final class ShortType throw new DatatypeException(i, "invalid short value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -128,6 +128,5 @@ final class ShortType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/SimpleType.java b/libjava/classpath/gnu/xml/validation/datatype/SimpleType.java index 1b84799..1233723 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/SimpleType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/SimpleType.java @@ -1,4 +1,4 @@ -/* SimpleType.java -- +/* SimpleType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,12 +60,12 @@ public class SimpleType * The variety of the <code>anySimpleType</code> datatype. */ public static final int ANY = 0; - + /** * The atomic variety. */ public static final int ATOMIC = 1; - + /** * The list variety. */ @@ -229,15 +229,15 @@ public class SimpleType { throw new UnsupportedOperationException(); } - + public Object createValue(String literal, ValidationContext context) { return literal; } - + public boolean sameValue(Object value1, Object value2) { return value1.equals(value2); } - + public int valueHashCode(Object value) { return value.hashCode(); } @@ -253,4 +253,3 @@ public class SimpleType } } - diff --git a/libjava/classpath/gnu/xml/validation/datatype/StringType.java b/libjava/classpath/gnu/xml/validation/datatype/StringType.java index 593c265..e20d1b8 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/StringType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/StringType.java @@ -1,4 +1,4 @@ -/* StringType.java -- +/* StringType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,4 +70,3 @@ final class StringType } } - diff --git a/libjava/classpath/gnu/xml/validation/datatype/TimeType.java b/libjava/classpath/gnu/xml/validation/datatype/TimeType.java index 0152e11..83ada5b 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/TimeType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/TimeType.java @@ -1,4 +1,4 @@ -/* TimeType.java -- +/* TimeType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -86,7 +86,7 @@ final class TimeType } return 0; } - + } static final int[] CONSTRAINING_FACETS = { @@ -217,7 +217,7 @@ final class TimeType throw new DatatypeException(len, "invalid time value"); } } - + public Object createValue(String value, ValidationContext context) { int len = value.length(); int state = 3; @@ -298,6 +298,5 @@ final class TimeType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/TokenType.java b/libjava/classpath/gnu/xml/validation/datatype/TokenType.java index 18e1e8a..dfe5f14 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/TokenType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/TokenType.java @@ -1,4 +1,4 @@ -/* TokenType.java -- +/* TokenType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -91,6 +91,5 @@ final class TokenType last = c; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/TotalDigitsFacet.java b/libjava/classpath/gnu/xml/validation/datatype/TotalDigitsFacet.java index 4debc63..25b50cd 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/TotalDigitsFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/TotalDigitsFacet.java @@ -1,4 +1,4 @@ -/* TotalDigitsFacet.java -- +/* TotalDigitsFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,7 +45,7 @@ package gnu.xml.validation.datatype; public final class TotalDigitsFacet extends Facet { - + public final int value; public final boolean fixed; @@ -56,7 +56,7 @@ public final class TotalDigitsFacet this.value = value; this.fixed = fixed; } - + public int hashCode() { return value; @@ -67,6 +67,5 @@ public final class TotalDigitsFacet return (other instanceof TotalDigitsFacet && ((TotalDigitsFacet) other).value == value); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/Type.java b/libjava/classpath/gnu/xml/validation/datatype/Type.java index be6f0a0..ebd6509 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/Type.java +++ b/libjava/classpath/gnu/xml/validation/datatype/Type.java @@ -1,4 +1,4 @@ -/* Type.java -- +/* Type.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -58,6 +58,5 @@ public abstract class Type { this.name = name; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/TypeBuilder.java b/libjava/classpath/gnu/xml/validation/datatype/TypeBuilder.java index 054eb8a..0873331 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/TypeBuilder.java +++ b/libjava/classpath/gnu/xml/validation/datatype/TypeBuilder.java @@ -1,4 +1,4 @@ -/* TypeBuilder.java -- +/* TypeBuilder.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,7 +54,7 @@ public class TypeBuilder { final SimpleType type; - + TypeBuilder(SimpleType type) { this.type = type; @@ -136,7 +136,7 @@ public class TypeBuilder } return new MaxLengthFacet(Integer.parseInt(value), fixed, null); } - + PatternFacet parsePatternFacet(String value) throws DatatypeException { @@ -185,7 +185,7 @@ public class TypeBuilder } return new MaxInclusiveFacet(type.createValue(value, context), fixed, null); } - + MaxExclusiveFacet parseMaxExclusiveFacet(String value, ValidationContext context) throws DatatypeException @@ -201,7 +201,7 @@ public class TypeBuilder } return new MaxExclusiveFacet(type.createValue(value, context), fixed, null); } - + MinExclusiveFacet parseMinExclusiveFacet(String value, ValidationContext context) throws DatatypeException @@ -217,7 +217,7 @@ public class TypeBuilder } return new MinExclusiveFacet(type.createValue(value, context), fixed, null); } - + MinInclusiveFacet parseMinInclusiveFacet(String value, ValidationContext context) throws DatatypeException @@ -233,7 +233,7 @@ public class TypeBuilder } return new MinInclusiveFacet(type.createValue(value, context), fixed, null); } - + TotalDigitsFacet parseTotalDigitsFacet(String value) throws DatatypeException { @@ -251,7 +251,7 @@ public class TypeBuilder throw new DatatypeException("value must be a positiveInteger"); return new TotalDigitsFacet(val, fixed, null); } - + FractionDigitsFacet parseFractionDigitsFacet(String value) throws DatatypeException { @@ -269,10 +269,10 @@ public class TypeBuilder throw new DatatypeException("value must be a positiveInteger"); return new FractionDigitsFacet(val, fixed, null); } - + public Datatype createDatatype() { return type; } - + } diff --git a/libjava/classpath/gnu/xml/validation/datatype/TypeLibrary.java b/libjava/classpath/gnu/xml/validation/datatype/TypeLibrary.java index f1daece..4db48f7 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/TypeLibrary.java +++ b/libjava/classpath/gnu/xml/validation/datatype/TypeLibrary.java @@ -1,4 +1,4 @@ -/* TypeLibrary.java -- +/* TypeLibrary.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -52,7 +52,7 @@ import org.relaxng.datatype.DatatypeLibrary; public class TypeLibrary implements DatatypeLibrary { - + public static final SimpleType ANY_SIMPLE_TYPE = new AnySimpleType(); public static final SimpleType STRING = new StringType(); @@ -169,5 +169,5 @@ public class TypeLibrary throw new DatatypeException("Unknown type name: " + typeLocalName); return type; } - + } diff --git a/libjava/classpath/gnu/xml/validation/datatype/TypeLibraryFactory.java b/libjava/classpath/gnu/xml/validation/datatype/TypeLibraryFactory.java index 21ee642..2f9bbd3 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/TypeLibraryFactory.java +++ b/libjava/classpath/gnu/xml/validation/datatype/TypeLibraryFactory.java @@ -1,4 +1,4 @@ -/* TypeLibraryFactory.java -- +/* TypeLibraryFactory.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -56,5 +56,5 @@ public class TypeLibraryFactory return new TypeLibrary(); return null; } - + } diff --git a/libjava/classpath/gnu/xml/validation/datatype/UnionSimpleType.java b/libjava/classpath/gnu/xml/validation/datatype/UnionSimpleType.java index d87c2aa..253e1df 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/UnionSimpleType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/UnionSimpleType.java @@ -1,4 +1,4 @@ -/* UnionSimpleType.java -- +/* UnionSimpleType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -57,7 +57,7 @@ public class UnionSimpleType * The member types in this union. */ public final List memberTypes; - + public UnionSimpleType(QName name, Set facets, int fundamentalFacets, SimpleType baseType, Annotation annotation, List memberTypes) @@ -78,6 +78,5 @@ public class UnionSimpleType } throw new DatatypeException("invalid union type value"); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/UnsignedByteType.java b/libjava/classpath/gnu/xml/validation/datatype/UnsignedByteType.java index 772c9cc..cf12abe 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/UnsignedByteType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/UnsignedByteType.java @@ -1,4 +1,4 @@ -/* UnsignedByteType.java -- +/* UnsignedByteType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -105,7 +105,7 @@ final class UnsignedByteType throw new DatatypeException(i, "invalid unsigned byte value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -116,6 +116,5 @@ final class UnsignedByteType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/UnsignedIntType.java b/libjava/classpath/gnu/xml/validation/datatype/UnsignedIntType.java index a4e8a68..b634442 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/UnsignedIntType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/UnsignedIntType.java @@ -1,4 +1,4 @@ -/* UnsignedIntType.java -- +/* UnsignedIntType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -105,7 +105,7 @@ final class UnsignedIntType throw new DatatypeException(i, "invalid unsigned int value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -116,6 +116,5 @@ final class UnsignedIntType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/UnsignedLongType.java b/libjava/classpath/gnu/xml/validation/datatype/UnsignedLongType.java index 5a36d8a..784b866 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/UnsignedLongType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/UnsignedLongType.java @@ -1,4 +1,4 @@ -/* UnsignedLongType.java -- +/* UnsignedLongType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -105,7 +105,7 @@ final class UnsignedLongType throw new DatatypeException(i, "invalid unsigned long value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -116,6 +116,5 @@ final class UnsignedLongType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/UnsignedShortType.java b/libjava/classpath/gnu/xml/validation/datatype/UnsignedShortType.java index 49f621b..ececb60 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/UnsignedShortType.java +++ b/libjava/classpath/gnu/xml/validation/datatype/UnsignedShortType.java @@ -1,4 +1,4 @@ -/* UnsignedShortType.java -- +/* UnsignedShortType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -106,7 +106,7 @@ final class UnsignedShortType throw new DatatypeException(i, "invalid unsigned short value"); } } - + public Object createValue(String literal, ValidationContext context) { try { @@ -117,6 +117,5 @@ final class UnsignedShortType return null; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/datatype/WhiteSpaceFacet.java b/libjava/classpath/gnu/xml/validation/datatype/WhiteSpaceFacet.java index 5920e1c..0f2109c 100644 --- a/libjava/classpath/gnu/xml/validation/datatype/WhiteSpaceFacet.java +++ b/libjava/classpath/gnu/xml/validation/datatype/WhiteSpaceFacet.java @@ -1,4 +1,4 @@ -/* WhiteSpaceFacet.java -- +/* WhiteSpaceFacet.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,11 +45,11 @@ package gnu.xml.validation.datatype; public final class WhiteSpaceFacet extends Facet { - + public static final int PRESERVE = 0; public static final int REPLACE = 1; public static final int COLLAPSE = 2; - + public final int value; public final boolean fixed; @@ -59,7 +59,7 @@ public final class WhiteSpaceFacet this.value = value; this.fixed = fixed; } - + public int hashCode() { return value; @@ -70,6 +70,5 @@ public final class WhiteSpaceFacet return (other instanceof WhiteSpaceFacet && ((WhiteSpaceFacet) other).value == value); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/relaxng/AnyNameNameClass.java b/libjava/classpath/gnu/xml/validation/relaxng/AnyNameNameClass.java index ecc016d..7b27a3c 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/AnyNameNameClass.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/AnyNameNameClass.java @@ -1,4 +1,4 @@ -/* AnyNameNameClass.java -- +/* AnyNameNameClass.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -47,7 +47,7 @@ class AnyNameNameClass { NameClass exceptNameClass; - + boolean matchesName(String uri, String localName) { return (exceptNameClass == null) ? true : @@ -55,4 +55,3 @@ class AnyNameNameClass } } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/AttributePattern.java b/libjava/classpath/gnu/xml/validation/relaxng/AttributePattern.java index 48443d6..54e414d 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/AttributePattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/AttributePattern.java @@ -1,4 +1,4 @@ -/* AttributePattern.java -- +/* AttributePattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,4 +50,3 @@ class AttributePattern Pattern pattern; } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/ChoiceNameClass.java b/libjava/classpath/gnu/xml/validation/relaxng/ChoiceNameClass.java index e196cd4..9c762b9 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/ChoiceNameClass.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/ChoiceNameClass.java @@ -1,4 +1,4 @@ -/* ChoiceNameClass.java -- +/* ChoiceNameClass.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,6 +54,5 @@ class ChoiceNameClass return name1.matchesName(uri, localName) || name2.matchesName(uri, localName); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/relaxng/ChoicePattern.java b/libjava/classpath/gnu/xml/validation/relaxng/ChoicePattern.java index 54739b2..48c96b2 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/ChoicePattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/ChoicePattern.java @@ -1,4 +1,4 @@ -/* ChoicePattern.java -- +/* ChoicePattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,4 +50,3 @@ class ChoicePattern Pattern pattern2; } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/DataPattern.java b/libjava/classpath/gnu/xml/validation/relaxng/DataPattern.java index 2315b2c..f4e36c7 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/DataPattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/DataPattern.java @@ -1,4 +1,4 @@ -/* DataPattern.java -- +/* DataPattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -55,6 +55,5 @@ class DataPattern DatatypeLibrary datatypeLibrary; List params = new LinkedList(); Pattern exceptPattern; - -} +} diff --git a/libjava/classpath/gnu/xml/validation/relaxng/Define.java b/libjava/classpath/gnu/xml/validation/relaxng/Define.java index 8801d58..ffb1d41 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/Define.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/Define.java @@ -1,4 +1,4 @@ -/* Define.java -- +/* Define.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -47,6 +47,5 @@ class Define String name; ElementPattern element; - -} +} diff --git a/libjava/classpath/gnu/xml/validation/relaxng/ElementPattern.java b/libjava/classpath/gnu/xml/validation/relaxng/ElementPattern.java index 9ff3570..e027319 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/ElementPattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/ElementPattern.java @@ -1,4 +1,4 @@ -/* ElementPattern.java -- +/* ElementPattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,4 +50,3 @@ class ElementPattern Pattern pattern; } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/EmptyPattern.java b/libjava/classpath/gnu/xml/validation/relaxng/EmptyPattern.java index ce568f8..13c2d3f 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/EmptyPattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/EmptyPattern.java @@ -1,4 +1,4 @@ -/* EmptyPattern.java -- +/* EmptyPattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,4 +49,3 @@ class EmptyPattern static final EmptyPattern INSTANCE = new EmptyPattern(); } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/FullSyntaxBuilder.java b/libjava/classpath/gnu/xml/validation/relaxng/FullSyntaxBuilder.java index 78e9f85..bb73c4f 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/FullSyntaxBuilder.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/FullSyntaxBuilder.java @@ -1,4 +1,4 @@ -/* FullSyntaxBuilder.java -- +/* FullSyntaxBuilder.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -97,7 +97,7 @@ class FullSyntaxBuilder defineAttrs.add("name"); defineAttrs.add("combine"); Set nsAttrs = Collections.singleton("ns"); - + VOCABULARY.put("element", elementAttrs); VOCABULARY.put("attribute", elementAttrs); VOCABULARY.put("group", Collections.EMPTY_SET); @@ -164,10 +164,10 @@ class FullSyntaxBuilder { urls = new HashSet(); refCount = 1; - + doc.normalizeDocument(); // Normalize XML document transform(doc); // Apply transformation rules to provide simple syntax - + // 4.18. grammar element Element p = doc.getDocumentElement(); Element grammar = @@ -248,7 +248,7 @@ class FullSyntaxBuilder } transform2(p); // Apply second stage transformation rules - + Grammar ret = parseGrammar(grammar); datatypeLibraries = null; // free datatype libraries cache return ret; @@ -463,7 +463,7 @@ class FullSyntaxBuilder !"grammar".equals(eName)) throw new GrammarException("included element is not " + "a grammar"); - + transform(element); urls.remove(href); // handle components @@ -513,9 +513,9 @@ class FullSyntaxBuilder } // transform to div element Document doc = include.getOwnerDocument(); - Element includeDiv = + Element includeDiv = doc.createElementNS(XMLConstants.RELAXNG_NS_URI, "div"); - Element grammarDiv = + Element grammarDiv = doc.createElementNS(XMLConstants.RELAXNG_NS_URI, "div"); // XXX copy include non-href attributes (none defined?) element = (Element) doc.importNode(element, true); @@ -849,7 +849,7 @@ class FullSyntaxBuilder } } } - + break; case Node.TEXT_NODE: case Node.CDATA_SECTION_NODE: @@ -935,7 +935,7 @@ class FullSyntaxBuilder Node grammar = grammar2; if ("parentRef".equals(elementName)) grammar = grammar1; - + String name = ((Element) node).getAttribute("name"); if (name != null) throw new GrammarException("no name attribute on " + @@ -1240,7 +1240,7 @@ class FullSyntaxBuilder } node.appendChild(child); } - + private static Element getFirstChildElement(Node node) { Node ctx = node.getFirstChild(); @@ -1485,7 +1485,7 @@ class FullSyntaxBuilder value.value = node.getTextContent(); return value; } - + ListPattern parseList(Element node) throws GrammarException { diff --git a/libjava/classpath/gnu/xml/validation/relaxng/Grammar.java b/libjava/classpath/gnu/xml/validation/relaxng/Grammar.java index 76eff4f..c2407da 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/Grammar.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/Grammar.java @@ -1,4 +1,4 @@ -/* Grammar.java -- +/* Grammar.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -65,6 +65,5 @@ class Grammar // TODO return null; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/relaxng/GrammarException.java b/libjava/classpath/gnu/xml/validation/relaxng/GrammarException.java index 71d03de..167cf64 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/GrammarException.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/GrammarException.java @@ -1,4 +1,4 @@ -/* GrammarException.java -- +/* GrammarException.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -52,5 +52,5 @@ class GrammarException { super(message); } - + } diff --git a/libjava/classpath/gnu/xml/validation/relaxng/GrammarValidator.java b/libjava/classpath/gnu/xml/validation/relaxng/GrammarValidator.java index d811aee..e4ff3da 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/GrammarValidator.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/GrammarValidator.java @@ -1,4 +1,4 @@ -/* GrammarValidator.java -- +/* GrammarValidator.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -93,5 +93,5 @@ class GrammarValidator { // TODO } - + } diff --git a/libjava/classpath/gnu/xml/validation/relaxng/GroupPattern.java b/libjava/classpath/gnu/xml/validation/relaxng/GroupPattern.java index b01090e..b63c7aa 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/GroupPattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/GroupPattern.java @@ -1,4 +1,4 @@ -/* GroupPattern.java -- +/* GroupPattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,6 +48,5 @@ class GroupPattern Pattern pattern1; Pattern pattern2; - -} +} diff --git a/libjava/classpath/gnu/xml/validation/relaxng/InterleavePattern.java b/libjava/classpath/gnu/xml/validation/relaxng/InterleavePattern.java index aa7c28e..8a877d7 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/InterleavePattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/InterleavePattern.java @@ -1,4 +1,4 @@ -/* InterleavePattern.java -- +/* InterleavePattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,6 +48,5 @@ class InterleavePattern Pattern pattern1; Pattern pattern2; - -} +} diff --git a/libjava/classpath/gnu/xml/validation/relaxng/ListPattern.java b/libjava/classpath/gnu/xml/validation/relaxng/ListPattern.java index 4c0393a..e16d5f6 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/ListPattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/ListPattern.java @@ -1,4 +1,4 @@ -/* ListPattern.java -- +/* ListPattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,4 +49,3 @@ class ListPattern Pattern pattern; } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/NSNameNameClass.java b/libjava/classpath/gnu/xml/validation/relaxng/NSNameNameClass.java index f485e99..2f620c1 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/NSNameNameClass.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/NSNameNameClass.java @@ -1,4 +1,4 @@ -/* NSNameNameClass.java -- +/* NSNameNameClass.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -56,6 +56,5 @@ class NSNameNameClass return (exceptNameClass == null) ? true : !exceptNameClass.matchesName(uri, localName); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/relaxng/NameClass.java b/libjava/classpath/gnu/xml/validation/relaxng/NameClass.java index 2a3dc83..0ef9ef1 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/NameClass.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/NameClass.java @@ -1,4 +1,4 @@ -/* NameClass.java -- +/* NameClass.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -46,5 +46,5 @@ abstract class NameClass { abstract boolean matchesName(String uri, String localName); - + } diff --git a/libjava/classpath/gnu/xml/validation/relaxng/NameNameClass.java b/libjava/classpath/gnu/xml/validation/relaxng/NameNameClass.java index d5a0c5f..b2d0e04 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/NameNameClass.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/NameNameClass.java @@ -1,4 +1,4 @@ -/* NameNameClass.java -- +/* NameNameClass.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -57,4 +57,3 @@ class NameNameClass } } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/NotAllowedPattern.java b/libjava/classpath/gnu/xml/validation/relaxng/NotAllowedPattern.java index 8263a45..d56afb2 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/NotAllowedPattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/NotAllowedPattern.java @@ -1,4 +1,4 @@ -/* NotAllowedPattern.java -- +/* NotAllowedPattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,5 +49,3 @@ class NotAllowedPattern static final NotAllowedPattern INSTANCE = new NotAllowedPattern(); } - - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/OneOrMorePattern.java b/libjava/classpath/gnu/xml/validation/relaxng/OneOrMorePattern.java index 99864d7..0545130 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/OneOrMorePattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/OneOrMorePattern.java @@ -1,4 +1,4 @@ -/* OneOrMorePattern.java -- +/* OneOrMorePattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,4 +49,3 @@ class OneOrMorePattern Pattern pattern; } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/Param.java b/libjava/classpath/gnu/xml/validation/relaxng/Param.java index 246ad20..65a1b66 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/Param.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/Param.java @@ -1,4 +1,4 @@ -/* Param.java -- +/* Param.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,4 +49,3 @@ class Param String value; } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/Pattern.java b/libjava/classpath/gnu/xml/validation/relaxng/Pattern.java index 3bf9a99..157f223 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/Pattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/Pattern.java @@ -1,4 +1,4 @@ -/* Pattern.java -- +/* Pattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,4 +45,3 @@ package gnu.xml.validation.relaxng; abstract class Pattern { } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java b/libjava/classpath/gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java index 890ca8e..c0c9bd8 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java @@ -1,4 +1,4 @@ -/* RelaxNGSchemaFactory.java -- +/* RelaxNGSchemaFactory.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -75,7 +75,7 @@ public class RELAXNGSchemaFactory public void setResourceResolver(LSResourceResolver resourceResolver) { this.resourceResolver = resourceResolver; - } + } public ErrorHandler getErrorHandler() { @@ -84,7 +84,7 @@ public class RELAXNGSchemaFactory public void setErrorHandler(ErrorHandler errorHandler) { - this.errorHandler = errorHandler; + this.errorHandler = errorHandler; } public boolean isSchemaLanguageSupported(String schemaLanguage) @@ -159,5 +159,5 @@ public class RELAXNGSchemaFactory throw e2; } } - + } diff --git a/libjava/classpath/gnu/xml/validation/relaxng/RefPattern.java b/libjava/classpath/gnu/xml/validation/relaxng/RefPattern.java index d7de095..8c1ff85 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/RefPattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/RefPattern.java @@ -1,4 +1,4 @@ -/* RefPattern.java -- +/* RefPattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,4 +49,3 @@ class RefPattern String name; } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/TextPattern.java b/libjava/classpath/gnu/xml/validation/relaxng/TextPattern.java index 06af3c3..81c5028 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/TextPattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/TextPattern.java @@ -1,4 +1,4 @@ -/* TextPattern.java -- +/* TextPattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,4 +49,3 @@ class TextPattern static final TextPattern INSTANCE = new TextPattern(); } - diff --git a/libjava/classpath/gnu/xml/validation/relaxng/ValuePattern.java b/libjava/classpath/gnu/xml/validation/relaxng/ValuePattern.java index 81260b0..8b63d79 100644 --- a/libjava/classpath/gnu/xml/validation/relaxng/ValuePattern.java +++ b/libjava/classpath/gnu/xml/validation/relaxng/ValuePattern.java @@ -1,4 +1,4 @@ -/* ValuePattern.java -- +/* ValuePattern.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -53,6 +53,5 @@ class ValuePattern Datatype type; String ns; String value; - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/AnyAttribute.java b/libjava/classpath/gnu/xml/validation/xmlschema/AnyAttribute.java index df90dc6..6f94bfe 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/AnyAttribute.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/AnyAttribute.java @@ -1,4 +1,4 @@ -/* AnyAttribute.java -- +/* AnyAttribute.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -62,6 +62,5 @@ final class AnyAttribute this.namespace = namespace; this.processContents = processContents; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/AttributeDeclaration.java b/libjava/classpath/gnu/xml/validation/xmlschema/AttributeDeclaration.java index 98b322b..c475b36 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/AttributeDeclaration.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/AttributeDeclaration.java @@ -1,4 +1,4 @@ -/* AttributeDeclaration.java -- +/* AttributeDeclaration.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -63,7 +63,7 @@ class AttributeDeclaration * One of NONE, DEFAULT, FIXED. */ final int type; - + /** * The value constraint. */ @@ -78,7 +78,7 @@ class AttributeDeclaration * The type definition corresponding to this attribute. */ final SimpleType datatype; - + /** * The annotation associated with this attribute declaration, if any. */ @@ -94,6 +94,5 @@ class AttributeDeclaration this.datatype = datatype; this.annotation = annotation; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/AttributeUse.java b/libjava/classpath/gnu/xml/validation/xmlschema/AttributeUse.java index f8bb11b..9370763 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/AttributeUse.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/AttributeUse.java @@ -1,4 +1,4 @@ -/* AttributeUse.java -- +/* AttributeUse.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -55,7 +55,7 @@ class AttributeUse * One of NONE, DEFAULT, FIXED. */ final int type; - + /** * The value constraint. */ @@ -74,6 +74,5 @@ class AttributeUse this.value = value; this.declaration = declaration; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/ComplexType.java b/libjava/classpath/gnu/xml/validation/xmlschema/ComplexType.java index 2c7acb1..826ba32 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/ComplexType.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/ComplexType.java @@ -1,4 +1,4 @@ -/* ComplexType.java -- +/* ComplexType.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -97,6 +97,5 @@ class ComplexType this.finality = finality; attributeUses = new LinkedHashSet(); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/ElementDeclaration.java b/libjava/classpath/gnu/xml/validation/xmlschema/ElementDeclaration.java index d41f5e5..7392ca5 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/ElementDeclaration.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/ElementDeclaration.java @@ -1,4 +1,4 @@ -/* ElementDeclaration.java -- +/* ElementDeclaration.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -58,7 +58,7 @@ class ElementDeclaration * The type definition corresponding to this element. */ Type datatype; - + /** * The scope of this schema component. * One of GLOBAL, LOCAL, or ABSENT. @@ -75,7 +75,7 @@ class ElementDeclaration * One of NONE, DEFAULT, FIXED. */ final int type; - + /** * The value constraint. */ @@ -84,7 +84,7 @@ class ElementDeclaration final boolean nillable; // TODO identity-constraint definitions - + final QName substitutionGroup; final int substitutionGroupExclusions; @@ -120,6 +120,5 @@ class ElementDeclaration this.disallowedSubstitutions = disallowedSubstitutions; this.isAbstract = isAbstract; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/Particle.java b/libjava/classpath/gnu/xml/validation/xmlschema/Particle.java index 995c4ff..5fe4920 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/Particle.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/Particle.java @@ -1,4 +1,4 @@ -/* Particle.java -- +/* Particle.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -56,6 +56,5 @@ class Particle this.maxOccurs = maxOccurs; this.term = term; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/ValidationException.java b/libjava/classpath/gnu/xml/validation/xmlschema/ValidationException.java index f2d6843..716ba88 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/ValidationException.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/ValidationException.java @@ -1,4 +1,4 @@ -/* ValidationException.java -- +/* ValidationException.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -53,6 +53,5 @@ class ValidationException { super(message, locator); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchema.java b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchema.java index 647cbde..fb8eb88 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchema.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchema.java @@ -1,4 +1,4 @@ -/* XMLSchema.java -- +/* XMLSchema.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -58,7 +58,7 @@ final class XMLSchema static final int FINAL_LIST = 0x04; static final int FINAL_UNION = 0x08; static final int FINAL_ALL = 0x0f; - + static final int BLOCK_NONE = 0x00; static final int BLOCK_EXTENSION = 0x01; static final int BLOCK_RESTRICTION = 0x02; @@ -129,6 +129,5 @@ final class XMLSchema //return new XMLSchemaValidatorHandler(this); return null; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java index 4506407..ba83973 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java @@ -1,4 +1,4 @@ -/* XMLSchemaAttributeTypeInfo.java -- +/* XMLSchemaAttributeTypeInfo.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,6 +94,5 @@ final class XMLSchemaAttributeTypeInfo derivationMethod); } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaBuilder.java b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaBuilder.java index ecf3ad3b..a7bad31 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaBuilder.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaBuilder.java @@ -1,4 +1,4 @@ -/* XMLSchemaBuilder.java -- +/* XMLSchemaBuilder.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -209,7 +209,7 @@ class XMLSchemaBuilder datatype, annotation); } - else + else { boolean required = "required".equals(use); // TODO ref @@ -427,7 +427,7 @@ class XMLSchemaBuilder String sgNamespace = node.lookupNamespaceURI(sgPrefix); substitutionGroup = new QName(sgNamespace, sgName); } - + String block = getAttribute(attrs, "block"); int substitutionGroupExclusions = (block == null) ? schema.blockDefault : @@ -436,10 +436,10 @@ class XMLSchemaBuilder int disallowedSubstitutions = (final_ == null) ? schema.finalDefault : parseFullDerivationSet(final_); - + boolean nillable = "true".equals(getAttribute(attrs, "nillable")); boolean isAbstract = "true".equals(getAttribute(attrs, "abstract")); - + if (notTopLevel) { minOccurs = getOccurrence(getAttribute(attrs, "minOccurs")); @@ -463,11 +463,11 @@ class XMLSchemaBuilder scope, parent, constraintType, constraintValue, nillable, - substitutionGroup, - substitutionGroupExclusions, + substitutionGroup, + substitutionGroupExclusions, disallowedSubstitutions, isAbstract); - + for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) { @@ -623,7 +623,7 @@ class XMLSchemaBuilder if (mixed) { type.contentType = XMLSchema.CONTENT_MIXED; - } + } return type; } @@ -835,6 +835,5 @@ class XMLSchemaBuilder } return name; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java index a65133c..99a59f3 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java @@ -1,4 +1,4 @@ -/* XMLSchemaElementTypeInfo.java -- +/* XMLSchemaElementTypeInfo.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -87,6 +87,5 @@ final class XMLSchemaElementTypeInfo return false; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java index 2b985a2..18e91f2 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java @@ -1,4 +1,4 @@ -/* XMLSchemaSchemaFactory.java -- +/* XMLSchemaSchemaFactory.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -77,7 +77,7 @@ public class XMLSchemaSchemaFactory { this.resourceResolver = resourceResolver; } - + public ErrorHandler getErrorHandler() { return this.errorHandler; @@ -85,7 +85,7 @@ public class XMLSchemaSchemaFactory public void setErrorHandler(ErrorHandler errorHandler) { - this.errorHandler = errorHandler; + this.errorHandler = errorHandler; } @@ -167,6 +167,5 @@ public class XMLSchemaSchemaFactory throw e2; } } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java index 60cc25f..c1ca951 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java @@ -1,4 +1,4 @@ -/* XMLSchemaTypeInfo.java -- +/* XMLSchemaTypeInfo.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -72,6 +72,5 @@ abstract class XMLSchemaTypeInfo } return false; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java index 9b20c0c..4fc80d3 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java @@ -1,4 +1,4 @@ -/* XMLSchemaTypeInfoProvider.java -- +/* XMLSchemaTypeInfoProvider.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -77,6 +77,5 @@ final class XMLSchemaTypeInfoProvider { return handler.isSpecified(index); } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaValidator.java b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaValidator.java index 056babf..6239ba6 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaValidator.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaValidator.java @@ -1,4 +1,4 @@ -/* XMLSchemaValidator.java -- +/* XMLSchemaValidator.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -58,7 +58,7 @@ final class XMLSchemaValidator ErrorHandler errorHandler; LSResourceResolver resourceResolver; - + XMLSchemaValidator(XMLSchema schema) { this.schema = schema; @@ -93,6 +93,5 @@ final class XMLSchemaValidator { this.resourceResolver = resourceResolver; } - -} +} diff --git a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java index 9e6d8e9..6c4f1f3 100644 --- a/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java +++ b/libjava/classpath/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java @@ -1,4 +1,4 @@ -/* XMLSchemaValidatorHandler.java -- +/* XMLSchemaValidatorHandler.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -260,7 +260,7 @@ final class XMLSchemaValidatorHandler } } // TODO 5, 6, 7 - + // parent if (!context.isEmpty()) { @@ -300,7 +300,7 @@ final class XMLSchemaValidatorHandler XMLSchemaAttributeTypeInfo attTypeInfo = new XMLSchemaAttributeTypeInfo(schema, attDecl, true); attributes.add(attTypeInfo); - + atts2.addAttribute(attUri, attLocalName, attQName, attType, attValue); atts2.setDeclared(count, declared); atts2.setSpecified(count, true); @@ -363,7 +363,7 @@ final class XMLSchemaValidatorHandler contentHandler.processingInstruction(target, data); } } - + public void skippedEntity(String name) throws SAXException { @@ -389,6 +389,5 @@ final class XMLSchemaValidatorHandler return Type.ANY_TYPE; return (SimpleType) typeLibrary.createDatatype(localName); } - -} +} diff --git a/libjava/classpath/gnu/xml/xpath/AndExpr.java b/libjava/classpath/gnu/xml/xpath/AndExpr.java index dd2e1c9..9213a40 100644 --- a/libjava/classpath/gnu/xml/xpath/AndExpr.java +++ b/libjava/classpath/gnu/xml/xpath/AndExpr.java @@ -1,4 +1,4 @@ -/* AndExpr.java -- +/* AndExpr.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -83,5 +83,5 @@ public final class AndExpr { return lhs + " and " + rhs; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/ArithmeticExpr.java b/libjava/classpath/gnu/xml/xpath/ArithmeticExpr.java index 61098d6..a7bc62f 100644 --- a/libjava/classpath/gnu/xml/xpath/ArithmeticExpr.java +++ b/libjava/classpath/gnu/xml/xpath/ArithmeticExpr.java @@ -1,4 +1,4 @@ -/* ArithmeticExpr.java -- +/* ArithmeticExpr.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -72,8 +72,8 @@ final class ArithmeticExpr case MULTIPLY: case DIVIDE: case MODULO: - this.op = op; - break; + this.op = op; + break; default: throw new IllegalArgumentException(); } @@ -166,5 +166,5 @@ final class ArithmeticExpr buf.append(rhs); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/xpath/BooleanFunction.java b/libjava/classpath/gnu/xml/xpath/BooleanFunction.java index f661b2a..05e0bd5 100644 --- a/libjava/classpath/gnu/xml/xpath/BooleanFunction.java +++ b/libjava/classpath/gnu/xml/xpath/BooleanFunction.java @@ -1,4 +1,4 @@ -/* BooleanFunction.java -- +/* BooleanFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,7 +60,7 @@ final class BooleanFunction { final Expr arg; - + BooleanFunction(List<Expr> args) { this(args.get(0)); @@ -70,7 +70,7 @@ final class BooleanFunction { this.arg = arg; } - + public Object evaluate(Node context, int pos, int len) { Object val = arg.evaluate(context, pos, len); @@ -86,10 +86,10 @@ final class BooleanFunction { return arg.references(var); } - + public String toString() { return "boolean(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/CeilingFunction.java b/libjava/classpath/gnu/xml/xpath/CeilingFunction.java index 1539884..aa906e0 100644 --- a/libjava/classpath/gnu/xml/xpath/CeilingFunction.java +++ b/libjava/classpath/gnu/xml/xpath/CeilingFunction.java @@ -1,4 +1,4 @@ -/* CeilingFunction.java -- +/* CeilingFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -53,17 +53,17 @@ final class CeilingFunction { final Expr arg; - + CeilingFunction(List<Expr> args) { this(args.get(0)); } - + CeilingFunction(Expr arg) { this.arg = arg; } - + public Object evaluate(Node context, int pos, int len) { Object val = arg.evaluate(context, pos, len); @@ -80,10 +80,10 @@ final class CeilingFunction { return arg.references(var); } - + public String toString() { return "ceiling(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/ConcatFunction.java b/libjava/classpath/gnu/xml/xpath/ConcatFunction.java index a61a454..58096e5 100644 --- a/libjava/classpath/gnu/xml/xpath/ConcatFunction.java +++ b/libjava/classpath/gnu/xml/xpath/ConcatFunction.java @@ -1,4 +1,4 @@ -/* ConcatFunction.java -- +/* ConcatFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -111,5 +111,5 @@ final class ConcatFunction buf.append(')'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/xpath/Constant.java b/libjava/classpath/gnu/xml/xpath/Constant.java index d5ca764..5ed39cc 100644 --- a/libjava/classpath/gnu/xml/xpath/Constant.java +++ b/libjava/classpath/gnu/xml/xpath/Constant.java @@ -1,4 +1,4 @@ -/* Constant.java -- +/* Constant.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,5 +94,5 @@ public final class Constant } return ret; } - -} + +} diff --git a/libjava/classpath/gnu/xml/xpath/ContainsFunction.java b/libjava/classpath/gnu/xml/xpath/ContainsFunction.java index 620606b..473d253 100644 --- a/libjava/classpath/gnu/xml/xpath/ContainsFunction.java +++ b/libjava/classpath/gnu/xml/xpath/ContainsFunction.java @@ -1,4 +1,4 @@ -/* ContainsFunction.java -- +/* ContainsFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -89,5 +89,5 @@ final class ContainsFunction { return "contains(" + arg1 + "," + arg2 + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/CountFunction.java b/libjava/classpath/gnu/xml/xpath/CountFunction.java index f29d833..e1892a0 100644 --- a/libjava/classpath/gnu/xml/xpath/CountFunction.java +++ b/libjava/classpath/gnu/xml/xpath/CountFunction.java @@ -1,4 +1,4 @@ -/* CountFunction.java -- +/* CountFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -64,7 +64,7 @@ final class CountFunction this.arg = arg; } - @Override + @Override public Object evaluate(Node context, int pos, int len) { Object val = arg.evaluate(context, pos, len); @@ -85,5 +85,5 @@ final class CountFunction { return "count(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/DocumentOrderComparator.java b/libjava/classpath/gnu/xml/xpath/DocumentOrderComparator.java index 605749d..c4471c1 100644 --- a/libjava/classpath/gnu/xml/xpath/DocumentOrderComparator.java +++ b/libjava/classpath/gnu/xml/xpath/DocumentOrderComparator.java @@ -1,4 +1,4 @@ -/* DocumentOrderComparator.java -- +/* DocumentOrderComparator.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,7 +48,7 @@ import org.w3c.dom.Node; public class DocumentOrderComparator implements Comparator<Node> { - + public int compare(Node n1, Node n2) { return (int) n1.compareDocumentPosition(n2); diff --git a/libjava/classpath/gnu/xml/xpath/EqualityExpr.java b/libjava/classpath/gnu/xml/xpath/EqualityExpr.java index 3b6fd56..133e1ff 100644 --- a/libjava/classpath/gnu/xml/xpath/EqualityExpr.java +++ b/libjava/classpath/gnu/xml/xpath/EqualityExpr.java @@ -1,4 +1,4 @@ -/* EqualityExpr.java -- +/* EqualityExpr.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -91,20 +91,20 @@ final class EqualityExpr boolean frns = right instanceof Collection; if (flns && frns) { - /* Suppression is safe, as we know context produces Collection<Node> */ - @SuppressWarnings("unchecked") - Collection<Node> lns = (Collection<Node>) left; - @SuppressWarnings("unchecked") - Collection<Node> rns = (Collection<Node>) right; + /* Suppression is safe, as we know context produces Collection<Node> */ + @SuppressWarnings("unchecked") + Collection<Node> lns = (Collection<Node>) left; + @SuppressWarnings("unchecked") + Collection<Node> rns = (Collection<Node>) right; if (lns.isEmpty()) { return false; } boolean all = true; - for (Node ltest : lns) - { - for (Node rtest : rns) - { + for (Node ltest : lns) + { + for (Node rtest : rns) + { if (ltest == rtest || ltest.equals(rtest)) { // much shorter @@ -128,7 +128,7 @@ final class EqualityExpr } return all; } - /* + /* * If one object to be compared is a node-set and the other is a number, * then the comparison will be true if and only if there is a node in * the node-set such that the result of performing the comparison on the @@ -140,13 +140,13 @@ final class EqualityExpr boolean frn = right instanceof Double; if ((flns && frn) || (frns && fln)) { - /* Suppression is safe, as we know context produces Collection<Node> */ - @SuppressWarnings("unchecked") - Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right; + /* Suppression is safe, as we know context produces Collection<Node> */ + @SuppressWarnings("unchecked") + Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right; double n = fln ? ((Double) left).doubleValue() : ((Double) right).doubleValue(); boolean all = true; - for (Node test : ns) + for (Node test : ns) { double nn = _number(context, stringValue(test)); if (nn == n) @@ -174,12 +174,12 @@ final class EqualityExpr boolean frs = right instanceof String; if ((flns && frs) || (frns && fls)) { - /* Suppression is safe, as we know context produces Collection<Node> */ - @SuppressWarnings("unchecked") - Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right; + /* Suppression is safe, as we know context produces Collection<Node> */ + @SuppressWarnings("unchecked") + Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right; String s = fls ? (String) left : (String) right; boolean all = true; - for (Node test : ns) + for (Node test : ns) { if (stringValue(test).equals(s)) { @@ -206,9 +206,9 @@ final class EqualityExpr boolean frb = right instanceof Boolean; if ((flns && frb) || (frns && flb)) { - /* Suppression is safe, as we know context produces Collection<Node> */ - @SuppressWarnings("unchecked") - Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right; + /* Suppression is safe, as we know context produces Collection<Node> */ + @SuppressWarnings("unchecked") + Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right; boolean b = flb ? ((Boolean) left).booleanValue() : ((Boolean) right).booleanValue(); return _boolean(context, ns) == b; @@ -270,5 +270,5 @@ final class EqualityExpr return lhs + " = " + rhs; } } - + } diff --git a/libjava/classpath/gnu/xml/xpath/Expr.java b/libjava/classpath/gnu/xml/xpath/Expr.java index 87ce3df..0e98f43 100644 --- a/libjava/classpath/gnu/xml/xpath/Expr.java +++ b/libjava/classpath/gnu/xml/xpath/Expr.java @@ -1,4 +1,4 @@ -/* Expr.java -- +/* Expr.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -112,7 +112,7 @@ public abstract class Expr return null; } } - + } public Object evaluate(Object item, QName returnType) @@ -143,10 +143,10 @@ public abstract class Expr { if (ret instanceof Collection) { - /* Suppression is safe, as we know context - produces Collection<Node> */ - @SuppressWarnings("unchecked") - Collection<Node> ns = (Collection<Node>) ret; + /* Suppression is safe, as we know context + produces Collection<Node> */ + @SuppressWarnings("unchecked") + Collection<Node> ns = (Collection<Node>) ret; switch (ns.size()) { case 0: @@ -171,12 +171,12 @@ public abstract class Expr throw new XPathExpressionException("return value is not a node-set"); } if (ret != null) - { - /* Suppression is safe, as we know context produces Collection<Node> */ - @SuppressWarnings("unchecked") - Collection<Node> nodes = (Collection<Node>) ret; - ret = new ExprNodeSet(nodes); - } + { + /* Suppression is safe, as we know context produces Collection<Node> */ + @SuppressWarnings("unchecked") + Collection<Node> nodes = (Collection<Node>) ret; + ret = new ExprNodeSet(nodes); + } } } return ret; @@ -185,7 +185,7 @@ public abstract class Expr public String evaluate(Object item) throws XPathExpressionException { - return (String) evaluate(item, XPathConstants.STRING); + return (String) evaluate(item, XPathConstants.STRING); } public Object evaluate(InputSource source, QName returnType) @@ -201,15 +201,15 @@ public abstract class Expr } catch (ParserConfigurationException e) { - throw new XPathExpressionException(e); + throw new XPathExpressionException(e); } catch (SAXException e) { - throw new XPathExpressionException(e); + throw new XPathExpressionException(e); } catch (IOException e) { - throw new XPathExpressionException(e); + throw new XPathExpressionException(e); } } @@ -224,7 +224,7 @@ public abstract class Expr public abstract Expr clone(Object context); public abstract boolean references(QName var); - + /* -- 4.1 Node Set Functions -- */ /** @@ -244,9 +244,9 @@ public abstract class Expr Set<Node> ret = new HashSet<Node>(); if (object instanceof Collection) { - /* Suppression is safe, as the iteration will check each value is a Node */ - @SuppressWarnings("unchecked") - Collection<Node> nodeSet = (Collection<Node>) object; + /* Suppression is safe, as the iteration will check each value is a Node */ + @SuppressWarnings("unchecked") + Collection<Node> nodeSet = (Collection<Node>) object; for (Iterator<Node> i = nodeSet.iterator(); i.hasNext(); ) { String string = stringValue(i.next()); @@ -303,7 +303,7 @@ public abstract class Expr String ret = node.getNamespaceURI(); return (ret == null) ? "" : ret; } - + /** * The name function returns a string containing a QName representing the * expanded-name of the node in the argument node-set that is first in @@ -391,7 +391,7 @@ public abstract class Expr { String ret = decimalFormat.format(d); if (ret.endsWith (".0")) - { + { ret = ret.substring(0, ret.length() - 2); } return ret; @@ -399,10 +399,10 @@ public abstract class Expr } if (object instanceof Collection) { - /* Suppression is safe, as we fail immediately if the - * first element is not a Node and don't use the rest */ - @SuppressWarnings("unchecked") - Collection<Node> nodeSet = (Collection<Node>) object; + /* Suppression is safe, as we fail immediately if the + * first element is not a Node and don't use the rest */ + @SuppressWarnings("unchecked") + Collection<Node> nodeSet = (Collection<Node>) object; if (nodeSet.isEmpty()) { return ""; @@ -414,7 +414,7 @@ public abstract class Expr } /* -- 4.3 Boolean Functions -- */ - + /** * Implementation of the XPath <code>boolean</code> function. */ @@ -463,10 +463,10 @@ public abstract class Expr } if (object instanceof Collection) { - /* Suppression is safe, as we fail immediately if one - * of the elements is not a Node */ - @SuppressWarnings("unchecked") - Collection<Node> nodeSet = (Collection<Node>) object; + /* Suppression is safe, as we fail immediately if one + * of the elements is not a Node */ + @SuppressWarnings("unchecked") + Collection<Node> nodeSet = (Collection<Node>) object; // Convert node-set to string object = stringValue(nodeSet); } @@ -505,7 +505,7 @@ public abstract class Expr { return stringValue(node, false); } - + static String stringValue(Node node, boolean elementMode) { switch (node.getNodeType()) diff --git a/libjava/classpath/gnu/xml/xpath/FalseFunction.java b/libjava/classpath/gnu/xml/xpath/FalseFunction.java index 87660ec..9a20f91 100644 --- a/libjava/classpath/gnu/xml/xpath/FalseFunction.java +++ b/libjava/classpath/gnu/xml/xpath/FalseFunction.java @@ -1,4 +1,4 @@ -/* FalseFunction.java -- +/* FalseFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -68,5 +68,5 @@ final class FalseFunction { return "false()"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/FloorFunction.java b/libjava/classpath/gnu/xml/xpath/FloorFunction.java index bbf56c9..ed61742 100644 --- a/libjava/classpath/gnu/xml/xpath/FloorFunction.java +++ b/libjava/classpath/gnu/xml/xpath/FloorFunction.java @@ -1,4 +1,4 @@ -/* FloorFunction.java -- +/* FloorFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -86,5 +86,5 @@ final class FloorFunction { return "floor(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/Function.java b/libjava/classpath/gnu/xml/xpath/Function.java index 12e2e11..f9eab2b 100644 --- a/libjava/classpath/gnu/xml/xpath/Function.java +++ b/libjava/classpath/gnu/xml/xpath/Function.java @@ -1,4 +1,4 @@ -/* Function.java -- +/* Function.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,4 +54,3 @@ public interface Function void setArguments(List<Expr> args); } - diff --git a/libjava/classpath/gnu/xml/xpath/FunctionCall.java b/libjava/classpath/gnu/xml/xpath/FunctionCall.java index e811f53..977482a 100644 --- a/libjava/classpath/gnu/xml/xpath/FunctionCall.java +++ b/libjava/classpath/gnu/xml/xpath/FunctionCall.java @@ -1,4 +1,4 @@ -/* FunctionCall.java -- +/* FunctionCall.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -83,7 +83,7 @@ public final class FunctionCall if (resolver != null) { QName qname = QName.valueOf(name); - int arity = args.size(); + int arity = args.size(); XPathFunction function = resolver.resolveFunction(qname, arity); if (function != null) { @@ -165,5 +165,5 @@ public final class FunctionCall buf.append(')'); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/xpath/IdFunction.java b/libjava/classpath/gnu/xml/xpath/IdFunction.java index b3d2208..7b6c6ac 100644 --- a/libjava/classpath/gnu/xml/xpath/IdFunction.java +++ b/libjava/classpath/gnu/xml/xpath/IdFunction.java @@ -1,4 +1,4 @@ -/* IdFunction.java -- +/* IdFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -99,5 +99,5 @@ public final class IdFunction { return "id(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/LangFunction.java b/libjava/classpath/gnu/xml/xpath/LangFunction.java index 33cf8b0..5a8d32f 100644 --- a/libjava/classpath/gnu/xml/xpath/LangFunction.java +++ b/libjava/classpath/gnu/xml/xpath/LangFunction.java @@ -1,4 +1,4 @@ -/* LangFunction.java -- +/* LangFunction.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -104,7 +104,7 @@ final class LangFunction } return null; } - + public Expr clone(Object context) { return new IdFunction(arg.clone(context)); @@ -119,5 +119,5 @@ final class LangFunction { return "lang(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/LastFunction.java b/libjava/classpath/gnu/xml/xpath/LastFunction.java index 751a0a9..51f988f 100644 --- a/libjava/classpath/gnu/xml/xpath/LastFunction.java +++ b/libjava/classpath/gnu/xml/xpath/LastFunction.java @@ -1,4 +1,4 @@ -/* LastFunction.java -- +/* LastFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -69,5 +69,5 @@ final class LastFunction { return "last()"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/LocalNameFunction.java b/libjava/classpath/gnu/xml/xpath/LocalNameFunction.java index dbad9d3..d829075 100644 --- a/libjava/classpath/gnu/xml/xpath/LocalNameFunction.java +++ b/libjava/classpath/gnu/xml/xpath/LocalNameFunction.java @@ -1,4 +1,4 @@ -/* LocalNameFunction.java -- +/* LocalNameFunction.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -69,7 +69,7 @@ final class LocalNameFunction this.arg = arg; } - @Override + @Override public Object evaluate(Node context, int pos, int len) { /* Suppression is safe, as we know context produces Collection<Node> */ @@ -94,5 +94,5 @@ final class LocalNameFunction { return (arg == null) ? "local-name()" : "local-name(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/NameFunction.java b/libjava/classpath/gnu/xml/xpath/NameFunction.java index 239a534..7db0be5 100644 --- a/libjava/classpath/gnu/xml/xpath/NameFunction.java +++ b/libjava/classpath/gnu/xml/xpath/NameFunction.java @@ -1,4 +1,4 @@ -/* NameFunction.java -- +/* NameFunction.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -77,7 +77,7 @@ final class NameFunction this.arg = arg; } - @Override + @Override public Object evaluate(Node context, int pos, int len) { /* Suppression is safe, as we know context produces Collection<Node> */ @@ -93,17 +93,17 @@ final class NameFunction return new NameFunction((arg == null) ? null : arg.clone(context)); } - + @Override public boolean references(QName var) { return (arg == null) ? false : arg.references(var); } - + @Override public String toString() { return (arg == null) ? "name()" : "name(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/NameTest.java b/libjava/classpath/gnu/xml/xpath/NameTest.java index 1710103..8bd06bd 100644 --- a/libjava/classpath/gnu/xml/xpath/NameTest.java +++ b/libjava/classpath/gnu/xml/xpath/NameTest.java @@ -1,4 +1,4 @@ -/* NameTest.java -- +/* NameTest.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -139,5 +139,5 @@ public final class NameTest return "*"; return qName.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/xpath/NamespaceTest.java b/libjava/classpath/gnu/xml/xpath/NamespaceTest.java index d93b76d..2f4fec1 100644 --- a/libjava/classpath/gnu/xml/xpath/NamespaceTest.java +++ b/libjava/classpath/gnu/xml/xpath/NamespaceTest.java @@ -1,4 +1,4 @@ -/* NamespaceTest.java -- +/* NamespaceTest.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -116,5 +116,5 @@ public final class NamespaceTest return "*"; return qName.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/xpath/NamespaceUriFunction.java b/libjava/classpath/gnu/xml/xpath/NamespaceUriFunction.java index 56da90f..4972b06 100644 --- a/libjava/classpath/gnu/xml/xpath/NamespaceUriFunction.java +++ b/libjava/classpath/gnu/xml/xpath/NamespaceUriFunction.java @@ -1,4 +1,4 @@ -/* NamespaceUriFunction.java -- +/* NamespaceUriFunction.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -63,13 +63,13 @@ final class NamespaceUriFunction { this(args.size() > 0 ? args.get(0) : null); } - + NamespaceUriFunction(Expr arg) { this.arg = arg; } - @Override + @Override public Object evaluate(Node context, int pos, int len) { /* Suppression is safe, as we know context produces Collection<Node> */ @@ -89,10 +89,10 @@ final class NamespaceUriFunction { return (arg == null) ? false : arg.references(var); } - + public String toString() { return (arg == null) ? "namespace-uri()" : "namespace-uri(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/NegativeExpr.java b/libjava/classpath/gnu/xml/xpath/NegativeExpr.java index 9e24aff..215ef3f 100644 --- a/libjava/classpath/gnu/xml/xpath/NegativeExpr.java +++ b/libjava/classpath/gnu/xml/xpath/NegativeExpr.java @@ -1,4 +1,4 @@ -/* NegativeExpr.java -- +/* NegativeExpr.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -77,5 +77,5 @@ final class NegativeExpr { return "-" + expr; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/NodeTypeTest.java b/libjava/classpath/gnu/xml/xpath/NodeTypeTest.java index 4fe1646..43e2699 100644 --- a/libjava/classpath/gnu/xml/xpath/NodeTypeTest.java +++ b/libjava/classpath/gnu/xml/xpath/NodeTypeTest.java @@ -1,4 +1,4 @@ -/* NodeTypeTest.java -- +/* NodeTypeTest.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -137,5 +137,5 @@ public final class NodeTypeTest throw new IllegalStateException(); } } - + } diff --git a/libjava/classpath/gnu/xml/xpath/NormalizeSpaceFunction.java b/libjava/classpath/gnu/xml/xpath/NormalizeSpaceFunction.java index 30069ac..6d728d9 100644 --- a/libjava/classpath/gnu/xml/xpath/NormalizeSpaceFunction.java +++ b/libjava/classpath/gnu/xml/xpath/NormalizeSpaceFunction.java @@ -1,4 +1,4 @@ -/* NormalizeSpaceFunction.java -- +/* NormalizeSpaceFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -65,7 +65,7 @@ final class NormalizeSpaceFunction { this(args.get(0)); } - + NormalizeSpaceFunction(Expr arg) { this.arg = arg; @@ -80,7 +80,7 @@ final class NormalizeSpaceFunction CPStringBuilder buf = new CPStringBuilder(); if (st.hasMoreTokens()) { - buf.append(st.nextToken()); + buf.append(st.nextToken()); while (st.hasMoreTokens()) { buf.append(' '); @@ -104,5 +104,5 @@ final class NormalizeSpaceFunction { return (arg == null) ? "normalize-space()" : "normalize-space(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/NotFunction.java b/libjava/classpath/gnu/xml/xpath/NotFunction.java index 188b3db..a7c20a0 100644 --- a/libjava/classpath/gnu/xml/xpath/NotFunction.java +++ b/libjava/classpath/gnu/xml/xpath/NotFunction.java @@ -1,4 +1,4 @@ -/* NotFunction.java -- +/* NotFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -84,5 +84,5 @@ final class NotFunction { return "not(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/NumberFunction.java b/libjava/classpath/gnu/xml/xpath/NumberFunction.java index 8804a78..0883102 100644 --- a/libjava/classpath/gnu/xml/xpath/NumberFunction.java +++ b/libjava/classpath/gnu/xml/xpath/NumberFunction.java @@ -1,4 +1,4 @@ -/* NumberFunction.java -- +/* NumberFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -99,5 +99,5 @@ final class NumberFunction { return "number(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/OrExpr.java b/libjava/classpath/gnu/xml/xpath/OrExpr.java index 1085f51..937dedf 100644 --- a/libjava/classpath/gnu/xml/xpath/OrExpr.java +++ b/libjava/classpath/gnu/xml/xpath/OrExpr.java @@ -1,4 +1,4 @@ -/* OrExpr.java -- +/* OrExpr.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -83,5 +83,5 @@ public final class OrExpr { return lhs + " or " + rhs; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/ParenthesizedExpr.java b/libjava/classpath/gnu/xml/xpath/ParenthesizedExpr.java index adadd67..e8ceb5a 100644 --- a/libjava/classpath/gnu/xml/xpath/ParenthesizedExpr.java +++ b/libjava/classpath/gnu/xml/xpath/ParenthesizedExpr.java @@ -1,4 +1,4 @@ -/* ParenthesizedExpr.java -- +/* ParenthesizedExpr.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,16 +60,16 @@ final class ParenthesizedExpr this.expr = expr; } - @Override + @Override public Object evaluate(Node context, int pos, int len) { Object ret = expr.evaluate(context, pos, len); if (ret instanceof Collection) { - /* Suppression is safe, as we know context produces - Collection<Node> */ - @SuppressWarnings("unchecked") - Collection<Node> nodes = (Collection<Node>) ret; + /* Suppression is safe, as we know context produces + Collection<Node> */ + @SuppressWarnings("unchecked") + Collection<Node> nodes = (Collection<Node>) ret; List<Node> list = new ArrayList<Node>(nodes); Collections.sort(list, documentOrderComparator); ret = list; @@ -91,5 +91,5 @@ final class ParenthesizedExpr { return "(" + expr + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/Path.java b/libjava/classpath/gnu/xml/xpath/Path.java index 809f965..f197595 100644 --- a/libjava/classpath/gnu/xml/xpath/Path.java +++ b/libjava/classpath/gnu/xml/xpath/Path.java @@ -1,4 +1,4 @@ -/* Path.java -- +/* Path.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,5 +50,5 @@ abstract class Path { abstract Collection<Node> evaluate(Node context, Collection<Node> nodeSet); - + } diff --git a/libjava/classpath/gnu/xml/xpath/Pattern.java b/libjava/classpath/gnu/xml/xpath/Pattern.java index 859ab56..ca03cda 100644 --- a/libjava/classpath/gnu/xml/xpath/Pattern.java +++ b/libjava/classpath/gnu/xml/xpath/Pattern.java @@ -1,4 +1,4 @@ -/* Pattern.java -- +/* Pattern.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -51,4 +51,3 @@ public abstract class Pattern public abstract boolean matches(Node context); } - diff --git a/libjava/classpath/gnu/xml/xpath/PositionFunction.java b/libjava/classpath/gnu/xml/xpath/PositionFunction.java index 3060eea..28ead3a 100644 --- a/libjava/classpath/gnu/xml/xpath/PositionFunction.java +++ b/libjava/classpath/gnu/xml/xpath/PositionFunction.java @@ -1,4 +1,4 @@ -/* PositionFunction.java -- +/* PositionFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -69,5 +69,5 @@ final class PositionFunction { return "position()"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/Predicate.java b/libjava/classpath/gnu/xml/xpath/Predicate.java index 5538c55..a02e22b 100644 --- a/libjava/classpath/gnu/xml/xpath/Predicate.java +++ b/libjava/classpath/gnu/xml/xpath/Predicate.java @@ -1,4 +1,4 @@ -/* Predicate.java -- +/* Predicate.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -76,10 +76,10 @@ class Predicate { return expr.references(var); } - + public String toString() { return "[" + expr + "]"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/RelationalExpr.java b/libjava/classpath/gnu/xml/xpath/RelationalExpr.java index 5cbb6bb..ac79d50 100644 --- a/libjava/classpath/gnu/xml/xpath/RelationalExpr.java +++ b/libjava/classpath/gnu/xml/xpath/RelationalExpr.java @@ -1,4 +1,4 @@ -/* RelationalExpr.java -- +/* RelationalExpr.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -103,5 +103,5 @@ final class RelationalExpr { return lhs + " " + (lt ? "<" : ">") + (eq ? "=" : "") + " " + rhs; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/Root.java b/libjava/classpath/gnu/xml/xpath/Root.java index cbcb249..8eef340 100644 --- a/libjava/classpath/gnu/xml/xpath/Root.java +++ b/libjava/classpath/gnu/xml/xpath/Root.java @@ -1,4 +1,4 @@ -/* Root.java -- +/* Root.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -87,5 +87,5 @@ public final class Root { return "/"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/RoundFunction.java b/libjava/classpath/gnu/xml/xpath/RoundFunction.java index 2d1bd54..3b79e3e 100644 --- a/libjava/classpath/gnu/xml/xpath/RoundFunction.java +++ b/libjava/classpath/gnu/xml/xpath/RoundFunction.java @@ -1,4 +1,4 @@ -/* RoundFunction.java -- +/* RoundFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -93,5 +93,5 @@ final class RoundFunction { return "round(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/Selector.java b/libjava/classpath/gnu/xml/xpath/Selector.java index 429b3f7..2146f26 100644 --- a/libjava/classpath/gnu/xml/xpath/Selector.java +++ b/libjava/classpath/gnu/xml/xpath/Selector.java @@ -1,4 +1,4 @@ -/* Selector.java -- +/* Selector.java -- Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -115,7 +115,7 @@ public final class Selector getContextPosition(context), getContextSize(context)); } - + boolean matches(Node context, int pos, int len) { short nodeType = context.getNodeType(); @@ -499,5 +499,5 @@ public final class Selector } return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/xpath/StartsWithFunction.java b/libjava/classpath/gnu/xml/xpath/StartsWithFunction.java index 2dc2c40..6f9716a 100644 --- a/libjava/classpath/gnu/xml/xpath/StartsWithFunction.java +++ b/libjava/classpath/gnu/xml/xpath/StartsWithFunction.java @@ -1,4 +1,4 @@ -/* StartsWithFunction.java -- +/* StartsWithFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -88,5 +88,5 @@ final class StartsWithFunction { return "starts-with(" + arg1 + "," + arg2 + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/Steps.java b/libjava/classpath/gnu/xml/xpath/Steps.java index 427fbe2..7564454 100644 --- a/libjava/classpath/gnu/xml/xpath/Steps.java +++ b/libjava/classpath/gnu/xml/xpath/Steps.java @@ -1,4 +1,4 @@ -/* Steps.java -- +/* Steps.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -86,7 +86,7 @@ public final class Steps if (pos > 0) { Pattern left = (Pattern) path.get(pos - 1); - for (Node candidate : possibleContexts(right, context)) + for (Node candidate : possibleContexts(right, context)) { if (left.matches(candidate) && matches(candidate, pos - 1)) @@ -160,7 +160,7 @@ public final class Steps return Collections.emptySet(); } - @Override + @Override public Object evaluate(Node context, int pos, int len) { //System.err.println(toString()+" evaluate"); @@ -172,16 +172,16 @@ public final class Steps while (val instanceof Collection && i.hasNext()) { Path rhs = (Path) i.next(); - /* Suppression is safe, as we know context produces Collection<Node> */ + /* Suppression is safe, as we know context produces Collection<Node> */ @SuppressWarnings("unchecked") - Collection<Node> nodes = (Collection<Node>) val; - val = rhs.evaluate(context, nodes); + Collection<Node> nodes = (Collection<Node>) val; + val = rhs.evaluate(context, nodes); //System.err.println("\tevaluate "+rhs+" = "+val); } return val; } - @Override + @Override Collection<Node> evaluate(Node context, Collection<Node> ns) { // Left to right @@ -195,14 +195,14 @@ public final class Steps { Set<Node> acc = new LinkedHashSet<Node>(); int pos = 1, len = ns.size(); - for (Node node : ns) + for (Node node : ns) { Object ret = lhs.evaluate(node, pos++, len); if (ret instanceof Collection) { - /* Suppression is safe, as we know context produces Collection<Node> */ - @SuppressWarnings("unchecked") - Collection<Node> nodes = (Collection<Node>) ret; + /* Suppression is safe, as we know context produces Collection<Node> */ + @SuppressWarnings("unchecked") + Collection<Node> nodes = (Collection<Node>) ret; acc.addAll(nodes); } } diff --git a/libjava/classpath/gnu/xml/xpath/StringFunction.java b/libjava/classpath/gnu/xml/xpath/StringFunction.java index b8cba37..b2b3cec 100644 --- a/libjava/classpath/gnu/xml/xpath/StringFunction.java +++ b/libjava/classpath/gnu/xml/xpath/StringFunction.java @@ -1,4 +1,4 @@ -/* StringFunction.java -- +/* StringFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -88,7 +88,7 @@ final class StringFunction { this(args.size() > 0 ? args.get(0) : null); } - + StringFunction(Expr arg) { this.arg = arg; @@ -115,5 +115,5 @@ final class StringFunction { return (arg == null) ? "string()" : "string(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/StringLengthFunction.java b/libjava/classpath/gnu/xml/xpath/StringLengthFunction.java index 561537e..c72b0d9b 100644 --- a/libjava/classpath/gnu/xml/xpath/StringLengthFunction.java +++ b/libjava/classpath/gnu/xml/xpath/StringLengthFunction.java @@ -1,4 +1,4 @@ -/* StringLengthFunction.java -- +/* StringLengthFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -59,7 +59,7 @@ final class StringLengthFunction { this(args.isEmpty() ? null : (Expr) args.get(0)); } - + StringLengthFunction(Expr arg) { this.arg = arg; @@ -88,5 +88,5 @@ final class StringLengthFunction { return (arg == null) ? "string-length()" : "string-length(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/SubstringAfterFunction.java b/libjava/classpath/gnu/xml/xpath/SubstringAfterFunction.java index ad75f2e..4f10723 100644 --- a/libjava/classpath/gnu/xml/xpath/SubstringAfterFunction.java +++ b/libjava/classpath/gnu/xml/xpath/SubstringAfterFunction.java @@ -1,4 +1,4 @@ -/* SubstringAfterFunction.java -- +/* SubstringAfterFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,5 +94,5 @@ final class SubstringAfterFunction { return "substring-after(" + arg1 + "," + arg2 + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/SubstringBeforeFunction.java b/libjava/classpath/gnu/xml/xpath/SubstringBeforeFunction.java index 1bf1657..1a5a04c 100644 --- a/libjava/classpath/gnu/xml/xpath/SubstringBeforeFunction.java +++ b/libjava/classpath/gnu/xml/xpath/SubstringBeforeFunction.java @@ -1,4 +1,4 @@ -/* SubstringBeforeFunction.java -- +/* SubstringBeforeFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -93,5 +93,5 @@ final class SubstringBeforeFunction { return "substring-before(" + arg1 + "," + arg2 + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/SubstringFunction.java b/libjava/classpath/gnu/xml/xpath/SubstringFunction.java index 33bcade..d17c3b6 100644 --- a/libjava/classpath/gnu/xml/xpath/SubstringFunction.java +++ b/libjava/classpath/gnu/xml/xpath/SubstringFunction.java @@ -1,4 +1,4 @@ -/* SubstringFunction.java -- +/* SubstringFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -91,7 +91,7 @@ final class SubstringFunction { Object val3 = arg3.evaluate(context, pos, len); int v3 = Expr.intValue(val3); - if (v3 < l) + if (v3 < l) l = v3; } @@ -115,5 +115,5 @@ final class SubstringFunction return (arg3 == null) ? "substring(" + arg1 + "," + arg2 + ")" : "substring(" + arg1 + "," + arg2 + "," + arg3 + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/SumFunction.java b/libjava/classpath/gnu/xml/xpath/SumFunction.java index 73db2a9..6c3323f 100644 --- a/libjava/classpath/gnu/xml/xpath/SumFunction.java +++ b/libjava/classpath/gnu/xml/xpath/SumFunction.java @@ -1,4 +1,4 @@ -/* SumFunction.java -- +/* SumFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -66,18 +66,18 @@ final class SumFunction this.arg = arg; } - @Override + @Override public Object evaluate(Node context, int pos, int len) { Object val = arg.evaluate(context, pos, len); double sum = 0.0d; if (val instanceof Collection) { - /* Suppression is safe, as we know context produces - Collection<Node> */ - @SuppressWarnings("unchecked") - Collection<Node> nodes = (Collection<Node>) val; - for (Node node : nodes) + /* Suppression is safe, as we know context produces + Collection<Node> */ + @SuppressWarnings("unchecked") + Collection<Node> nodes = (Collection<Node>) val; + for (Node node : nodes) { String s = stringValue(node); sum += _number(context, s); @@ -100,5 +100,5 @@ final class SumFunction { return "sum(" + arg + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/Test.java b/libjava/classpath/gnu/xml/xpath/Test.java index 94837ff..529c99b 100644 --- a/libjava/classpath/gnu/xml/xpath/Test.java +++ b/libjava/classpath/gnu/xml/xpath/Test.java @@ -1,4 +1,4 @@ -/* Test.java -- +/* Test.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/gnu/xml/xpath/TranslateFunction.java b/libjava/classpath/gnu/xml/xpath/TranslateFunction.java index 8b4b8b2..4e06354 100644 --- a/libjava/classpath/gnu/xml/xpath/TranslateFunction.java +++ b/libjava/classpath/gnu/xml/xpath/TranslateFunction.java @@ -1,4 +1,4 @@ -/* TranslateFunction.java -- +/* TranslateFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -110,8 +110,8 @@ final class TranslateFunction if (!replaced) { buf.append(c); - } - } + } + } return buf.toString(); } @@ -126,10 +126,10 @@ final class TranslateFunction return (arg1.references(var) || arg2.references(var) || arg3.references(var)); } - + public String toString() { return "translate(" + arg1 + "," + arg2 + "," + arg3 + ")"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/TrueFunction.java b/libjava/classpath/gnu/xml/xpath/TrueFunction.java index 6ad42d7..41ab54b 100644 --- a/libjava/classpath/gnu/xml/xpath/TrueFunction.java +++ b/libjava/classpath/gnu/xml/xpath/TrueFunction.java @@ -1,4 +1,4 @@ -/* TrueFunction.java -- +/* TrueFunction.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -68,5 +68,5 @@ final class TrueFunction { return "true()"; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/UnionExpr.java b/libjava/classpath/gnu/xml/xpath/UnionExpr.java index 03ae5c0..bd5f5e9 100644 --- a/libjava/classpath/gnu/xml/xpath/UnionExpr.java +++ b/libjava/classpath/gnu/xml/xpath/UnionExpr.java @@ -1,4 +1,4 @@ -/* UnionExpr.java -- +/* UnionExpr.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -74,7 +74,7 @@ public final class UnionExpr return false; } - @Override + @Override public Object evaluate(Node context, int pos, int len) { Object left = lhs.evaluate(context, pos, len); @@ -83,13 +83,13 @@ public final class UnionExpr if (left instanceof Collection && right instanceof Collection) { Set<Node> set = new HashSet<Node>(); - /* Suppression is safe as addAll will check the types - of the elements and throw a ClassCastException as necessary */ - @SuppressWarnings("unchecked") - Collection<Node> l = (Collection<Node>) left; - @SuppressWarnings("unchecked") - Collection<Node> r = (Collection<Node>) right; - set.addAll (l); + /* Suppression is safe as addAll will check the types + of the elements and throw a ClassCastException as necessary */ + @SuppressWarnings("unchecked") + Collection<Node> l = (Collection<Node>) left; + @SuppressWarnings("unchecked") + Collection<Node> r = (Collection<Node>) right; + set.addAll (l); set.addAll (r); list = new ArrayList<Node>(set); Collections.sort(list, documentOrderComparator); @@ -113,5 +113,5 @@ public final class UnionExpr { return lhs + " | " + rhs; } - + } diff --git a/libjava/classpath/gnu/xml/xpath/VariableReference.java b/libjava/classpath/gnu/xml/xpath/VariableReference.java index 9ef6f16..e1698c9 100644 --- a/libjava/classpath/gnu/xml/xpath/VariableReference.java +++ b/libjava/classpath/gnu/xml/xpath/VariableReference.java @@ -1,4 +1,4 @@ -/* VariableReference.java -- +/* VariableReference.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -98,5 +98,5 @@ public class VariableReference buf.append(name.getLocalPart()); return buf.toString(); } - + } diff --git a/libjava/classpath/gnu/xml/xpath/XPathFactoryImpl.java b/libjava/classpath/gnu/xml/xpath/XPathFactoryImpl.java index 45dc57e..970cf0e 100644 --- a/libjava/classpath/gnu/xml/xpath/XPathFactoryImpl.java +++ b/libjava/classpath/gnu/xml/xpath/XPathFactoryImpl.java @@ -1,4 +1,4 @@ -/* XPathFactoryImpl.java -- +/* XPathFactoryImpl.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -86,5 +86,5 @@ public class XPathFactoryImpl { return new XPathImpl(null, variableResolver, functionResolver); } - + } diff --git a/libjava/classpath/gnu/xml/xpath/XPathImpl.java b/libjava/classpath/gnu/xml/xpath/XPathImpl.java index 3511834..62f8617 100644 --- a/libjava/classpath/gnu/xml/xpath/XPathImpl.java +++ b/libjava/classpath/gnu/xml/xpath/XPathImpl.java @@ -1,4 +1,4 @@ -/* XPathImpl.java -- +/* XPathImpl.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -126,7 +126,7 @@ public class XPathImpl throw new XPathExpressionException(expression); } } - + public Object evaluate(String expression, Object item, QName returnType) diff --git a/libjava/classpath/gnu/xml/xpath/XPathParser.java b/libjava/classpath/gnu/xml/xpath/XPathParser.java index e8c8e94..26e5909 100644 --- a/libjava/classpath/gnu/xml/xpath/XPathParser.java +++ b/libjava/classpath/gnu/xml/xpath/XPathParser.java @@ -1,6 +1,6 @@ // created by jay 0.8 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de - // line 2 "XPathParser.y" + // line 2 "XPathParser.y" /* XPathParser.y - An XPath 1.0 parser. Copyright (C) 2004 The Free Software Foundation @@ -206,7 +206,7 @@ public class XPathParser return new FunctionCall(functionResolver, name, args); } - // line 211 "-" + // line 211 "-" // %token constants public static final int LITERAL = 257; @@ -364,7 +364,7 @@ public class XPathParser @throws yyException on irrecoverable parse error. */ public Object yyparse (yyInput yyLex, Object yydebug) - throws java.io.IOException, yyException { + throws java.io.IOException, yyException { //t this.yydebug = (jay.yydebug.yyDebug)yydebug; return yyparse(yyLex); } @@ -392,15 +392,15 @@ public class XPathParser @throws yyException on irrecoverable parse error. */ public Object yyparse (yyInput yyLex) - throws java.io.IOException, yyException { - if (yyMax <= 0) yyMax = 256; // initial size - int yyState = 0, yyStates[] = new int[yyMax]; // state stack - Object yyVal = null, yyVals[] = new Object[yyMax]; // value stack - int yyToken = -1; // current input - int yyErrorFlag = 0; // #tks to shift + throws java.io.IOException, yyException { + if (yyMax <= 0) yyMax = 256; // initial size + int yyState = 0, yyStates[] = new int[yyMax]; // state stack + Object yyVal = null, yyVals[] = new Object[yyMax]; // value stack + int yyToken = -1; // current input + int yyErrorFlag = 0; // #tks to shift yyLoop: for (int yyTop = 0;; ++ yyTop) { - if (yyTop >= yyStates.length) { // dynamically increase + if (yyTop >= yyStates.length) { // dynamically increase int[] i = new int[yyStates.length+yyMax]; System.arraycopy(yyStates, 0, i, 0, yyStates.length); yyStates = i; @@ -412,9 +412,9 @@ public class XPathParser yyVals[yyTop] = yyVal; //t if (yydebug != null) yydebug.push(yyState, yyVal); - yyDiscarded: for (;;) { // discarding a token does not change stack + yyDiscarded: for (;;) { // discarding a token does not change stack int yyN; - if ((yyN = YyDefRedClass.yyDefRed[yyState]) == 0) { // else [default] reduce (yyN) + if ((yyN = YyDefRedClass.yyDefRed[yyState]) == 0) { // else [default] reduce (yyN) if (yyToken < 0) { yyToken = yyLex.advance() ? yyLex.token() : 0; //t if (yydebug != null) @@ -424,7 +424,7 @@ public class XPathParser && yyN < YyTableClass.yyTable.length && YyCheckClass.yyCheck[yyN] == yyToken) { //t if (yydebug != null) //t yydebug.shift(yyState, YyTableClass.yyTable[yyN], yyErrorFlag-1); - yyState = YyTableClass.yyTable[yyN]; // shift to yyN + yyState = YyTableClass.yyTable[yyN]; // shift to yyN yyVal = yyLex.value(); yyToken = -1; if (yyErrorFlag > 0) -- yyErrorFlag; @@ -432,14 +432,14 @@ public class XPathParser } if ((yyN = YyRindexClass.yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0 && yyN < YyTableClass.yyTable.length && YyCheckClass.yyCheck[yyN] == yyToken) - yyN = YyTableClass.yyTable[yyN]; // reduce (yyN) + yyN = YyTableClass.yyTable[yyN]; // reduce (yyN) else switch (yyErrorFlag) { - + case 0: yyerror("syntax error", yyExpecting(yyState)); //t if (yydebug != null) yydebug.error("syntax error"); - + case 1: case 2: yyErrorFlag = 3; do { @@ -456,7 +456,7 @@ public class XPathParser } while (-- yyTop >= 0); //t if (yydebug != null) yydebug.reject(); throw new yyException("irrecoverable syntax error"); - + case 3: if (yyToken == 0) { //t if (yydebug != null) yydebug.reject(); @@ -464,9 +464,9 @@ public class XPathParser } //t if (yydebug != null) //t yydebug.discard(yyState, yyToken, yyname(yyToken), -//t yyLex.value()); +//t yyLex.value()); yyToken = -1; - continue yyDiscarded; // leave stack alone + continue yyDiscarded; // leave stack alone } } int yyV = yyTop + 1-YyLenClass.yyLen[yyN]; @@ -475,13 +475,13 @@ public class XPathParser yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 4: - // line 277 "XPathParser.y" + // line 277 "XPathParser.y" { yyVal = new Root(); } break; case 5: - // line 281 "XPathParser.y" + // line 281 "XPathParser.y" { Steps steps; if (yyVals[0+yyTop] instanceof Steps) @@ -499,7 +499,7 @@ case 5: } break; case 6: - // line 297 "XPathParser.y" + // line 297 "XPathParser.y" { Test nt = new NodeTypeTest((short) 0); Selector s = new Selector(Selector.DESCENDANT_OR_SELF, @@ -522,7 +522,7 @@ case 6: } break; case 8: - // line 322 "XPathParser.y" + // line 322 "XPathParser.y" { Steps steps; if (yyVals[-2+yyTop] instanceof Steps) @@ -540,7 +540,7 @@ case 8: } break; case 9: - // line 338 "XPathParser.y" + // line 338 "XPathParser.y" { Test nt = new NodeTypeTest((short) 0); Selector s = new Selector(Selector.DESCENDANT_OR_SELF, @@ -563,14 +563,14 @@ case 9: } break; case 10: - // line 362 "XPathParser.y" + // line 362 "XPathParser.y" { @SuppressWarnings("unchecked") List<Test> tests = (List<Test>) yyVals[0+yyTop]; yyVal = new Selector (Selector.CHILD, tests); } break; case 11: - // line 366 "XPathParser.y" + // line 366 "XPathParser.y" { /* This is safe as we create this in one of the other cases */ @SuppressWarnings("unchecked") List<Test> tests = (List<Test>) yyVals[0+yyTop]; @@ -578,7 +578,7 @@ case 11: } break; case 12: - // line 370 "XPathParser.y" + // line 370 "XPathParser.y" { /* This is safe as we create this in one of the other cases */ @SuppressWarnings("unchecked") List<Test> tests = (List<Test>) yyVals[0+yyTop]; @@ -586,21 +586,21 @@ case 12: } break; case 13: - // line 374 "XPathParser.y" + // line 374 "XPathParser.y" { List<Test> emptyList = Collections.emptyList(); yyVal = new Selector (Selector.SELF, emptyList); } break; case 14: - // line 378 "XPathParser.y" + // line 378 "XPathParser.y" { List<Test> emptyList = Collections.emptyList(); yyVal = new Selector (Selector.PARENT, emptyList); } break; case 15: - // line 385 "XPathParser.y" + // line 385 "XPathParser.y" { List<Test> list = new ArrayList<Test>(); list.add((Test) yyVals[0+yyTop]); @@ -608,7 +608,7 @@ case 15: } break; case 16: - // line 391 "XPathParser.y" + // line 391 "XPathParser.y" { /* This is safe as we create this in one of the other cases */ @SuppressWarnings("unchecked") List<Test> tests = (List<Test>)yyVals[-1+yyTop]; @@ -617,128 +617,128 @@ case 16: } break; case 17: - // line 415 "XPathParser.y" + // line 415 "XPathParser.y" { yyVal = new Integer(Selector.ANCESTOR); } break; case 18: - // line 419 "XPathParser.y" + // line 419 "XPathParser.y" { yyVal = new Integer(Selector.ANCESTOR_OR_SELF); } break; case 19: - // line 423 "XPathParser.y" + // line 423 "XPathParser.y" { yyVal = new Integer(Selector.ATTRIBUTE); } break; case 20: - // line 427 "XPathParser.y" + // line 427 "XPathParser.y" { yyVal = new Integer(Selector.CHILD); } break; case 21: - // line 431 "XPathParser.y" + // line 431 "XPathParser.y" { yyVal = new Integer(Selector.DESCENDANT); } break; case 22: - // line 435 "XPathParser.y" + // line 435 "XPathParser.y" { yyVal = new Integer(Selector.DESCENDANT_OR_SELF); } break; case 23: - // line 439 "XPathParser.y" + // line 439 "XPathParser.y" { yyVal = new Integer(Selector.FOLLOWING); } break; case 24: - // line 443 "XPathParser.y" + // line 443 "XPathParser.y" { yyVal = new Integer(Selector.FOLLOWING_SIBLING); } break; case 25: - // line 447 "XPathParser.y" + // line 447 "XPathParser.y" { yyVal = new Integer(Selector.NAMESPACE); } break; case 26: - // line 451 "XPathParser.y" + // line 451 "XPathParser.y" { yyVal = new Integer(Selector.PARENT); } break; case 27: - // line 455 "XPathParser.y" + // line 455 "XPathParser.y" { yyVal = new Integer(Selector.PRECEDING); } break; case 28: - // line 459 "XPathParser.y" + // line 459 "XPathParser.y" { yyVal = new Integer(Selector.PRECEDING_SIBLING); } break; case 29: - // line 463 "XPathParser.y" + // line 463 "XPathParser.y" { yyVal = new Integer(Selector.SELF); } break; case 31: - // line 472 "XPathParser.y" + // line 472 "XPathParser.y" { yyVal = new NodeTypeTest(Node.PROCESSING_INSTRUCTION_NODE, (String) yyVals[-1+yyTop]); } break; case 32: - // line 477 "XPathParser.y" + // line 477 "XPathParser.y" { yyVal = new NodeTypeTest(((Short) yyVals[-1+yyTop]).shortValue()); } break; case 33: - // line 484 "XPathParser.y" + // line 484 "XPathParser.y" { yyVal = new Predicate((Expr) yyVals[-1+yyTop]); } break; case 35: - // line 492 "XPathParser.y" + // line 492 "XPathParser.y" { yyVal = new ParenthesizedExpr((Expr) yyVals[-1+yyTop]); } break; case 36: - // line 496 "XPathParser.y" + // line 496 "XPathParser.y" { yyVal = new Constant(yyVals[0+yyTop]); } break; case 37: - // line 500 "XPathParser.y" + // line 500 "XPathParser.y" { yyVal = new Constant(yyVals[0+yyTop]); } break; case 39: - // line 508 "XPathParser.y" + // line 508 "XPathParser.y" { List<Expr> emptyList = Collections.emptyList(); yyVal = lookupFunction((String) yyVals[-2+yyTop], emptyList); } break; case 40: - // line 512 "XPathParser.y" + // line 512 "XPathParser.y" { /* This is safe as we create this below */ @SuppressWarnings("unchecked") List<Expr> exprs = (List<Expr>) yyVals[-1+yyTop]; @@ -746,7 +746,7 @@ case 40: } break; case 41: - // line 519 "XPathParser.y" + // line 519 "XPathParser.y" { List<Expr> list = new ArrayList<Expr>(); list.add((Expr) yyVals[0+yyTop]); @@ -754,7 +754,7 @@ case 41: } break; case 42: - // line 525 "XPathParser.y" + // line 525 "XPathParser.y" { /* This is safe as we create this above */ @SuppressWarnings("unchecked") List<Expr> list = (List<Expr>) yyVals[0+yyTop]; @@ -763,13 +763,13 @@ case 42: } break; case 44: - // line 535 "XPathParser.y" + // line 535 "XPathParser.y" { yyVal = new UnionExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]); } break; case 47: - // line 544 "XPathParser.y" + // line 544 "XPathParser.y" { Steps steps; if (yyVals[0+yyTop] instanceof Steps) @@ -787,7 +787,7 @@ case 47: } break; case 48: - // line 560 "XPathParser.y" + // line 560 "XPathParser.y" { Test nt = new NodeTypeTest((short) 0); Selector s = new Selector(Selector.DESCENDANT_OR_SELF, @@ -810,7 +810,7 @@ case 48: } break; case 50: - // line 585 "XPathParser.y" + // line 585 "XPathParser.y" { Predicate filter = (Predicate) yyVals[0+yyTop]; Selector s = new Selector(Selector.SELF, @@ -831,171 +831,171 @@ case 50: } break; case 52: - // line 608 "XPathParser.y" + // line 608 "XPathParser.y" { yyVal = new OrExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]); } break; case 54: - // line 616 "XPathParser.y" + // line 616 "XPathParser.y" { yyVal = new AndExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]); } break; case 56: - // line 624 "XPathParser.y" + // line 624 "XPathParser.y" { yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false); } break; case 57: - // line 628 "XPathParser.y" + // line 628 "XPathParser.y" { yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true); } break; case 59: - // line 636 "XPathParser.y" + // line 636 "XPathParser.y" { yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, false); } break; case 60: - // line 640 "XPathParser.y" + // line 640 "XPathParser.y" { yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, false); } break; case 61: - // line 644 "XPathParser.y" + // line 644 "XPathParser.y" { yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, true); } break; case 62: - // line 648 "XPathParser.y" + // line 648 "XPathParser.y" { yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, true); } break; case 64: - // line 656 "XPathParser.y" + // line 656 "XPathParser.y" { yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.ADD); } break; case 65: - // line 660 "XPathParser.y" + // line 660 "XPathParser.y" { yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.SUBTRACT); } break; case 67: - // line 668 "XPathParser.y" + // line 668 "XPathParser.y" { yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MULTIPLY); } break; case 68: - // line 672 "XPathParser.y" + // line 672 "XPathParser.y" { yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.DIVIDE); } break; case 69: - // line 676 "XPathParser.y" + // line 676 "XPathParser.y" { yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MODULO); } break; case 71: - // line 684 "XPathParser.y" + // line 684 "XPathParser.y" { yyVal = new NegativeExpr((Expr) yyVals[0+yyTop]); } break; case 72: - // line 691 "XPathParser.y" + // line 691 "XPathParser.y" { yyVal = new Double((String) yyVals[0+yyTop] + ".0"); } break; case 73: - // line 695 "XPathParser.y" + // line 695 "XPathParser.y" { yyVal = new Double((String) yyVals[-1+yyTop] + ".0"); } break; case 74: - // line 699 "XPathParser.y" + // line 699 "XPathParser.y" { yyVal = new Double((String) yyVals[-2+yyTop] + "." + (String) yyVals[0+yyTop]); } break; case 75: - // line 703 "XPathParser.y" + // line 703 "XPathParser.y" { yyVal = new Double("0." + (String) yyVals[0+yyTop]); } break; case 77: - // line 732 "XPathParser.y" + // line 732 "XPathParser.y" { String name = (String) yyVals[0+yyTop]; yyVal = new VariableReference(variableResolver, getQName(name)); } break; case 78: - // line 740 "XPathParser.y" + // line 740 "XPathParser.y" { yyVal = new NameTest(null, true, true); } break; case 79: - // line 744 "XPathParser.y" + // line 744 "XPathParser.y" { QName qName = getQName((String) yyVals[-2+yyTop]); yyVal = new NameTest(qName, true, false); } break; case 80: - // line 749 "XPathParser.y" + // line 749 "XPathParser.y" { QName qName = getQName((String) yyVals[0+yyTop]); yyVal = new NameTest(qName, false, false); } break; case 82: - // line 758 "XPathParser.y" + // line 758 "XPathParser.y" { yyVal = (String) yyVals[-2+yyTop] + ':' + (String) yyVals[0+yyTop]; } break; case 83: - // line 765 "XPathParser.y" + // line 765 "XPathParser.y" { yyVal = new Short(Node.COMMENT_NODE); } break; case 84: - // line 769 "XPathParser.y" + // line 769 "XPathParser.y" { yyVal = new Short(Node.TEXT_NODE); } break; case 85: - // line 773 "XPathParser.y" + // line 773 "XPathParser.y" { yyVal = new Short(Node.PROCESSING_INSTRUCTION_NODE); } break; case 86: - // line 777 "XPathParser.y" + // line 777 "XPathParser.y" { yyVal = new Short((short) 0); } break; - // line 988 "-" + // line 988 "-" } yyTop -= YyLenClass.yyLen[yyN]; yyState = yyStates[yyTop]; @@ -1020,7 +1020,7 @@ case 86: else yyState = YyDgotoClass.yyDgoto[yyM]; //t if (yydebug != null) yydebug.shift(yyStates[yyTop], yyState); - continue yyLoop; + continue yyLoop; } } } @@ -1438,7 +1438,7 @@ case 86: protected static final class YyNameClass { - public static final String yyName [] = { + public static final String yyName [] = { "end-of-file",null,null,null,null,null,null,null,null,null,null,null, null,null,null,null,null,null,null,null,null,null,null,null,null,null, null,null,null,null,null,null,null,null,null,null,null,null,null,null, @@ -1469,7 +1469,7 @@ case 86: } /* End of class YyNameClass */ - // line 783 "XPathParser.y" + // line 783 "XPathParser.y" } - // line 1463 "-" + // line 1463 "-" diff --git a/libjava/classpath/gnu/xml/xpath/XPathTokenizer.java b/libjava/classpath/gnu/xml/xpath/XPathTokenizer.java index bf4516a..879931b 100644 --- a/libjava/classpath/gnu/xml/xpath/XPathTokenizer.java +++ b/libjava/classpath/gnu/xml/xpath/XPathTokenizer.java @@ -1,4 +1,4 @@ -/* XPathTokenizer.java -- +/* XPathTokenizer.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -53,7 +53,7 @@ import antlr.TokenStreamIOException;*/ /** * XPath 1.0 expression tokenizer. - * + * * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class XPathTokenizer @@ -89,7 +89,7 @@ implements XPathParser.yyInput { return val; } - + } static final Map<String,Integer> keywords = new TreeMap<String,Integer> (); @@ -151,7 +151,7 @@ implements XPathParser.yyInput throw new TokenStreamIOException (e); } } - + * End ANTLR specific */ public boolean advance () |