elena       2002/08/26 14:51:20

  Modified:    java/src/org/w3c/dom/ls DOMBuilder.java
                        DOMBuilderFilter.java DOMEntityResolver.java
                        DOMImplementationLS.java DOMInputSource.java
                        DOMWriter.java DOMWriterFilter.java DocumentLS.java
                        LSLoadEvent.java LSProgressEvent.java
  Log:
  Update according to the latest draft: 
http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725/
  
  Revision  Changes    Path
  1.4       +75 -42    xml-xerces/java/src/org/w3c/dom/ls/DOMBuilder.java
  
  Index: DOMBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/DOMBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DOMBuilder.java   23 Aug 2002 20:14:40 -0000      1.3
  +++ DOMBuilder.java   26 Aug 2002 21:51:19 -0000      1.4
  @@ -18,12 +18,11 @@
   import org.apache.xerces.dom3.DOMErrorHandler;
   
   /**
  - * DOM Level 3 WD Experimental:
  +  * DOM Level 3 WD Experimental:
    * The DOM Level 3 specification is at the stage 
    * of Working Draft, which represents work in 
    * progress and thus may be updated, replaced, 
    * or obsoleted by other documents at any time. 
  - * <p>
    * A interface to an object that is able to build a DOM tree from various 
    * input sources.
    * <p><code>DOMBuilder</code> provides an API for parsing XML documents and 
  @@ -54,7 +53,7 @@
    * to <code>true</code>.
    * <p> Asynchronous <code>DOMBuilder</code> objects are expected to also 
    * implement the <code>events::EventTarget</code> interface so that event 
  - * listeners can be registerd on asynchronous <code>DOMBuilder</code> 
  + * listeners can be registered on asynchronous <code>DOMBuilder</code> 
    * objects. 
    * <p> Events supported by asynchronous <code>DOMBuilder</code> are: load: The 
    * document that's being loaded is completely parsed, see the definition of 
  @@ -73,14 +72,26 @@
    * <code>true</code> or <code>false</code> must be supported or is optional 
    * and, which state is the default one: 
    * <dl>
  - * <dt><code>"cdata-sections"</code></dt>
  + * <dt><code>"canonical-form"</code></dt>
    * <dd> This 
    * feature is equivalent to the one provided on 
    * <code>Document.setNormalizationFeature</code> in . </dd>
  - * <dt><code>"comments"</code></dt>
  + * <dt>
  + * <code>"cdata-sections"</code></dt>
  + * <dd> This feature is equivalent to the one 
  + * provided on <code>Document.setNormalizationFeature</code> in . </dd>
  + * <dt>
  + * <code>"certified"</code></dt>
    * <dd>
  - *  This feature is equivalent to the one provided on 
  - * <code>Document.setNormalizationFeature</code> in . </dd>
  + * <dl>
  + * <dt><code>true</code></dt>
  + * <dd>[optional] Assume, when XML 1.1 
  + * is supported, that the input is certified (see section 2.13 in ). </dd>
  + * <dt>
  + * <code>false</code></dt>
  + * <dd>[required] (default) Don't assume that the input is 
  + * certified (see section 2.13 in ). </dd>
  + * </dl></dd>
    * <dt>
    * <code>"charset-overrides-xml-encoding"</code></dt>
    * <dd>
  @@ -98,26 +109,33 @@
    * character set encoding information from higher level protocols is ignored 
    * by the parser. </dd>
    * </dl></dd>
  - * <dt><code>"datatype-normalization"</code></dt>
  - * <dd> This feature is 
  - * equivalent to the one provided on 
  - * <code>Document.setNormalizationFeature</code> in . </dd>
  - * <dt><code>"entities"</code></dt>
  - * <dd>
  - *  This feature is equivalent to the one provided on 
  - * <code>Document.setNormalizationFeature</code> in . </dd>
  + * <dt><code>"comments"</code></dt>
  + * <dd> This feature is equivalent to the 
  + * one provided on <code>Document.setNormalizationFeature</code> in . </dd>
    * <dt>
  - * <code>"canonical-form"</code></dt>
  - * <dd> This feature is equivalent to the one 
  - * provided on <code>Document.setNormalizationFeature</code> in . </dd>
  + * <code>"datatype-normalization"</code></dt>
  + * <dd> This feature is equivalent to the 
  + * one provided on <code>Document.setNormalizationFeature</code> in . </dd>
    * <dt>
  - * <code>"infoset"</code></dt>
  + * <code>"entities"</code></dt>
    * <dd> This feature is equivalent to the one provided on 
    * <code>Document.setNormalizationFeature</code> in . </dd>
  + * <dt><code>"infoset"</code></dt>
  + * <dd> 
  + * This feature is equivalent to the one provided on 
  + * <code>Document.setNormalizationFeature</code> in . Setting this feature 
  + * to <code>true</code> will also force the feature <code>namespaces</code> 
  + * to <code>true</code>. </dd>
  + * <dt><code>"namespaces"</code></dt>
  + * <dd>
  + * <dl>
  + * <dt><code>true</code></dt>
  + * <dd>[required
  + * ] (default) Perform the namespace processing as defined in . </dd>
    * <dt>
  - * <code>"namespaces"</code></dt>
  - * <dd> This feature is equivalent to the one provided 
  - * on <code>Document.setNormalizationFeature</code> in . </dd>
  + * <code>false</code></dt>
  + * <dd>[optional] Do not perform the namespace processing. </dd>
  + * </dl></dd>
    * <dt>
    * <code>"namespace-declarations"</code></dt>
    * <dd> This feature is equivalent to the 
  @@ -136,19 +154,34 @@
    * default) Don't check the media type, accept any type of data. </dd>
    * </dl></dd>
    * <dt>
  + * <code>"unknown-characters"</code></dt>
  + * <dd>
  + * <dl>
  + * <dt><code>true</code></dt>
  + * <dd>[required] (default) 
  + * If, while verifying full normalization when XML 1.1 is supported, a 
  + * processor encounters characters for which it cannot determine the 
  + * normalization properties, then the processor will ignore any possible 
  + * denormalizations caused by these characters. </dd>
  + * <dt><code>false</code></dt>
  + * <dd>[optional] 
  + * Report an fatal error if a character is encountered for which the 
  + * processor can not determine the normalization properties. </dd>
  + * </dl></dd>
  + * <dt>
  + * <code>"validate"</code></dt>
  + * <dd> This feature is equivalent to the one provided on 
  + * <code>Document.setNormalizationFeature</code> in . </dd>
  + * <dt>
    * <code>"validate-if-schema"</code></dt>
    * <dd> This feature is equivalent to the one 
    * provided on <code>Document.setNormalizationFeature</code> in . </dd>
    * <dt>
  - * <code>"validation"</code></dt>
  - * <dd> This feature is equivalent to the one provided 
  - * on <code>Document.setNormalizationFeature</code> in . </dd>
  - * <dt>
    * <code>"whitespace-in-element-content"</code></dt>
    * <dd> This feature is equivalent 
    * to the one provided on <code>Document.setNormalizationFeature</code> in . </dd>
    * </dl>
  - * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409'>Document Object Model 
(DOM) Level 3 Abstract Schemas and Load
  + * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>Document Object Model 
(DOM) Level 3 Load
   and Save Specification</a>.
    */
   public interface DOMBuilder {
  @@ -158,6 +191,8 @@
        * <code>DOMBuilder</code> will pass the public and system IDs to the 
        * entity resolver, which can then specify the actual source of the 
        * entity.
  +     * <br> If this attribute is <code>null</code>, the resolution of entities 
  +     * in the document is implementation dependent. 
        */
       public DOMEntityResolver getEntityResolver();
       /**
  @@ -166,6 +201,8 @@
        * <code>DOMBuilder</code> will pass the public and system IDs to the 
        * entity resolver, which can then specify the actual source of the 
        * entity.
  +     * <br> If this attribute is <code>null</code>, the resolution of entities 
  +     * in the document is implementation dependent. 
        */
       public void setEntityResolver(DOMEntityResolver entityResolver);
   
  @@ -181,7 +218,7 @@
        * should also pass any other valuable information to the error handler, 
        * such as file name, line number, and so on. Mutations to the document 
        * from within an error handler will result in implementation dependent 
  -     * behavour. 
  +     * behaviour. 
        */
       public DOMErrorHandler getErrorHandler();
       /**
  @@ -196,7 +233,7 @@
        * should also pass any other valuable information to the error handler, 
        * such as file name, line number, and so on. Mutations to the document 
        * from within an error handler will result in implementation dependent 
  -     * behavour. 
  +     * behaviour. 
        */
       public void setErrorHandler(DOMErrorHandler errorHandler);
   
  @@ -291,16 +328,8 @@
        *   <code>Document</code> is returned. If the <code>DOMBuilder</code> 
        *   is asynchronous then <code>null</code> is returned since the 
        *   document object is not yet parsed when this method returns.
  -     * @exception DOMSystemException
  -     *   Exceptions raised by <code>parse</code> originate with the installed 
  -     *   ErrorHandler, and thus depend on the implementation of the 
  -     *   <code>DOMErrorHandler</code> interfaces. The default ErrorHandlers 
  -     *   will raise a <code>DOMSystemException</code> if any form I/O or 
  -     *   other system error occurs during the parse, but application defined 
  -     *   ErrorHandlers are not required to do so. 
        */
  -    public Document parse(DOMInputSource is)
  -                          throws Exception;
  +    public Document parse(DOMInputSource is);
   
       // ACTION_TYPES
       /**
  @@ -332,18 +361,22 @@
       public static final short ACTION_INSERT_BEFORE      = 4;
   
       /**
  -     *  Parse an XML document or fragment from a resource identified by a 
  +     *  Parse an XML fragment from a resource identified by a 
        * <code>DOMInputSource</code> and insert the content into an existing 
        * document at the position specified with the <code>contextNode</code> 
        * and <code>action</code> arguments. When parsing the input stream the 
  -     * context node is used for resolving unbound namespace prefixes. 
  +     * context node is used for resolving unbound namespace prefixes. The 
  +     * <code>Document</code> node, attached to the context node, is used to 
  +     * resolved default attributes and entity references. 
        * <br> As the new data is inserted into the document at least one 
  -     * mutation event is fired per immidate child (or sibling) of context 
  +     * mutation event is fired per immediate child (or sibling) of context 
        * node. 
        * <br> If an error occurs while parsing, the caller is notified through 
        * the error handler. 
        * @param is  The <code>DOMInputSource</code> from which the source 
  -     *   document is to be read. 
  +     *   document is to be read. The source document must be an XML 
  +     *   fragment, i.e. anything except an XML Document, a DOCTYPE, entities 
  +     *   declarations, notations declarations, or XML or text declarations. 
        * @param cnode  The node that is used as the context for the data that 
        *   is being parsed. This node must be a <code>Document</code> node, a 
        *   <code>DocumentFragment</code> node, or a node of a type that is 
  
  
  
  1.3       +42 -26    xml-xerces/java/src/org/w3c/dom/ls/DOMBuilderFilter.java
  
  Index: DOMBuilderFilter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/DOMBuilderFilter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DOMBuilderFilter.java     19 Jun 2002 22:26:25 -0000      1.2
  +++ DOMBuilderFilter.java     26 Aug 2002 21:51:19 -0000      1.3
  @@ -12,15 +12,15 @@
   
   package org.w3c.dom.ls;
   
  -import org.w3c.dom.Node;
  +import org.w3c.dom.Element;
  +import org.w3c.dom.Node;         
   
   /**
  - * DOM Level 3 WD Experimental:
  +  * DOM Level 3 WD Experimental:
    * The DOM Level 3 specification is at the stage 
    * of Working Draft, which represents work in 
    * progress and thus may be updated, replaced, 
    * or obsoleted by other documents at any time. 
  - * <p>
    * <code>DOMBuilderFilter</code>s provide applications the ability to examine 
    * nodes as they are being constructed during a parse. As each node is 
    * examined, it may be modified or removed, or the entire parse may be 
  @@ -28,7 +28,9 @@
    * <p>At the time any of the filter methods are called by the parser, the 
    * owner Document and DOMImplementation objects exist and are accessible. 
    * The document element is never passed to the <code>DOMBuilderFilter</code> 
  - * methods, i.e. it is not possible to filter out the document element.
  + * methods, i.e. it is not possible to filter out the document element. The 
  + * <code>Document</code>, <code>DocumentType</code>, <code>Notation</code>, 
  + * and <code>Entity</code> nodes are not passed to the filter.
    * <p>All validity checking while reading a document occurs on the source 
    * document as it appears on the input stream, not on the DOM document as it 
    * is built in memory. With filters, the document in memory may be a subset 
  @@ -37,40 +39,51 @@
    * <p> All default content, including default attributes, must be passed to 
    * the filter methods. 
    * <p> Any exception raised in the filter are ignored by the 
  - * <code>DOMBuilder</code>. 
  - * <p> The constants <code>FILTER_ACCEPT</code>, <code>FILTER_REJECT</code> 
  - * and <code>FILTER_SKIP</code> are defined in DOM Level 2 Traversal . The 
  - * description of these methods is not complete
  - * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409'>Document Object Model 
(DOM) Level 3 Abstract Schemas and Load
  + * <code>DOMBuilder</code>. The description of these methods is not complete
  + * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>Document Object Model 
(DOM) Level 3 Load
   and Save Specification</a>.
    */
   public interface DOMBuilderFilter {
  +    // Constants returned by startElement and acceptNode
  +    /**
  +     * Accept the node.
  +     */
  +    public static final short FILTER_ACCEPT             = 1;
  +    /**
  +     * Reject the node abd its children.
  +     */
  +    public static final short FILTER_REJECT             = 2;
  +    /**
  +     * Skip this single node. The children of this node will still be 
  +     * considered. 
  +     */
  +    public static final short FILTER_SKIP               = 3;
       /**
        *  Interrupt the normal processing of the document. 
        */
       public static final short FILTER_INTERRUPT          = 4;
  +
       /**
        * This method will be called by the parser after each <code>Element</code>
        *  start tag has been scanned, but before the remainder of the 
        * <code>Element</code> is processed. The intent is to allow the 
        * element, including any children, to be efficiently skipped. Note that 
  -     * only element nodes are passed to the <code>startContainer</code> 
  +     * only element nodes are passed to the <code>startElement</code> 
        * function.
  -     * <br>The element node passed to <code>startContainer</code> for 
  -     * filtering will include all of the Element's attributes, but none of 
  -     * the children nodes. The Element may not yet be in place in the 
  -     * document being constructed (it may not have a parent node.) 
  -     * <br>A <code>startContainer</code> filter function may access or change 
  -     * the attributers for the Element. Changing Namespace declarations will 
  +     * <br>The element node passed to <code>startElement</code> for filtering 
  +     * will include all of the Element's attributes, but none of the 
  +     * children nodes. The Element may not yet be in place in the document 
  +     * being constructed (it may not have a parent node.) 
  +     * <br>A <code>startElement</code> filter function may access or change 
  +     * the attributes for the Element. Changing Namespace declarations will 
        * have no effect on namespace resolution by the parser.
        * <br>For efficiency, the Element node passed to the filter may not be 
        * the same one as is actually placed in the tree if the node is 
        * accepted. And the actual node (node object identity) may be reused 
        * during the process of reading in and filtering a document.
  -     * @param snode The newly encountered element. At the time this method is 
  +     * @param elt The newly encountered element. At the time this method is 
        *   called, the element is incomplete - it will have its attributes, 
  -     *   but no children. Should the parameter be an Element since we only 
  -     *   passed elements to startContainer?
  +     *   but no children. 
        * @return  <code>FILTER_ACCEPT</code> if this <code>Element</code> 
        *   should be included in the DOM document being built.  
        *   <code>FILTER_REJECT</code> if the <code>Element</code> and all of 
  @@ -79,15 +92,14 @@
        *   inserted in place of the rejected <code>Element</code> node.  
        *   <code>FILTER_INTERRUPT</code> if the filter wants to stop the 
        *   processing of the document. Interrupting the processing of the 
  -     *   document does no longer garantee that the entire is XML 
  -     *   well-formed.  Returning any other values will result in unspecified 
  -     *   behavior. 
  +     *   document does no longer guarantee that the entire is XML well-formed
  +     *   .  Returning any other values will result in unspecified behavior. 
        */
  -    public short startContainer(Node snode);
  +    public short startElement(Element elt);
   
       /**
        * This method will be called by the parser at the completion of the 
  -     * parsing of each node. The node and all of its decendants will exist 
  +     * parsing of each node. The node and all of its descendants will exist 
        * and be complete. The parent node will also exist, although it may be 
        * incomplete, i.e. it may have additional children that have not yet 
        * been parsed. Attribute nodes are never passed to this function.
  @@ -100,7 +112,7 @@
        * document, before any modification by the filter. No validity checks 
        * are made on any document modifications made by the filter.
        * <br>If this new node is rejected, the parser might reuse the new node 
  -     * or any of its decendants.
  +     * or any of its descendants.
        * @param enode The newly constructed element. At the time this method is 
        *   called, the element is complete - it has all of its children (and 
        *   their children, recursively) and attributes, and is attached as a 
  @@ -110,7 +122,11 @@
        *   <code>FILTER_REJECT</code> if the <code>Node</code> and all of its 
        *   children should be rejected.  <code>FILTER_SKIP</code> if the 
        *   <code>Node</code> should be skipped and the <code>Node</code> 
  -     *   should be replaced by all the children of the <code>Node</code>. 
  +     *   should be replaced by all the children of the <code>Node</code>.  
  +     *   <code>FILTER_INTERRUPT</code> if the filter wants to stop the 
  +     *   processing of the document. Interrupting the processing of the 
  +     *   document does no longer guarantee that the entire is XML well-formed
  +     *   . 
        */
       public short acceptNode(Node enode);
   
  
  
  
  1.3       +5 -10     xml-xerces/java/src/org/w3c/dom/ls/DOMEntityResolver.java
  
  Index: DOMEntityResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/DOMEntityResolver.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DOMEntityResolver.java    19 Jun 2002 22:26:25 -0000      1.2
  +++ DOMEntityResolver.java    26 Aug 2002 21:51:19 -0000      1.3
  @@ -12,13 +12,12 @@
   
   package org.w3c.dom.ls;
   
  -/** 
  - * DOM Level 3 WD Experimental:
  +/**
  +  * DOM Level 3 WD Experimental:
    * The DOM Level 3 specification is at the stage 
    * of Working Draft, which represents work in 
    * progress and thus may be updated, replaced, 
    * or obsoleted by other documents at any time. 
  - * <p>
    * <code>DOMEntityResolver</code> Provides a way for applications to redirect 
    * references to external entities.
    * <p>Applications needing to implement customized handling for external 
  @@ -31,9 +30,9 @@
    * <p>Many DOM applications will not need to implement this interface, but it 
    * will be especially useful for applications that build XML documents from 
    * databases or other specialized input sources, or for applications that 
  - * use URNs. <code>DOMEtityResolver</code> is based on the SAX2  
  + * use URNs. <code>DOMEntityResolver</code> is based on the SAX2  
    * <code>EntityResolver</code> interface. 
  - * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409'>Document Object Model 
(DOM) Level 3 Abstract Schemas and Load
  + * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>Document Object Model 
(DOM) Level 3 Load
   and Save Specification</a>.
    */
   public interface DOMEntityResolver {
  @@ -64,13 +63,9 @@
        * @return A <code>DOMInputSource</code> object describing the new input 
        *   source, or <code>null</code> to request that the parser open a 
        *   regular URI connection to the system identifier. 
  -     * @exception DOMSystemException
  -     *   Any <code>DOMSystemException</code>, possibly wrapping another 
  -     *   exception. 
        */
       public DOMInputSource resolveEntity(String publicId, 
                                           String systemId, 
  -                                        String baseURI)
  -                                        throws Exception;
  +                                        String baseURI);
   
   }
  
  
  
  1.3       +29 -11    xml-xerces/java/src/org/w3c/dom/ls/DOMImplementationLS.java
  
  Index: DOMImplementationLS.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/DOMImplementationLS.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DOMImplementationLS.java  19 Jun 2002 22:26:25 -0000      1.2
  +++ DOMImplementationLS.java  26 Aug 2002 21:51:19 -0000      1.3
  @@ -14,22 +14,24 @@
   
   import org.w3c.dom.DOMException;
   
  -/** 
  - * DOM Level 3 WD Experimental:
  +/**
  +  * DOM Level 3 WD Experimental:
    * The DOM Level 3 specification is at the stage 
    * of Working Draft, which represents work in 
    * progress and thus may be updated, replaced, 
    * or obsoleted by other documents at any time. 
  - * <p>
    *  <code>DOMImplementationLS</code> contains the factory methods for creating 
    * objects that implement the <code>DOMBuilder</code> (parser) and 
    * <code>DOMWriter</code> (serializer) interfaces. 
  - * <p> An object that implements DOMImplementationLS is obtained by doing a 
  - * binding specific cast from DOMImplementation to DOMImplementationLS. 
  - * Implementations supporting the Load and Save feature must implement the 
  - * DOMImplementationLS interface on whatever object implements the 
  - * DOMImplementation interface. 
  - * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409'>Document Object Model 
(DOM) Level 3 Abstract Schemas and Load
  + * <p> The expectation is that an instance of the 
  + * <code>DOMImplementationLS</code> interface can be obtained by using 
  + * binding-specific casting methods on an instance of the 
  + * <code>DOMImplementation</code> interface or, if the <code>Document</code> 
  + * supports the feature <code>"Core"</code> version <code>"3.0"</code> 
  + * defined in , by using the method <code>Node.getInterface</code> with 
  + * parameter values <code>"LS-Load"</code> and <code>"3.0"</code> 
  + * (respectively). 
  + * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>Document Object Model 
(DOM) Level 3 Load
   and Save Specification</a>.
    */
   public interface DOMImplementationLS {
  @@ -69,7 +71,15 @@
        *   absolute URI in order to use this method. 
        * @return  The newly created <code>DOMBuilder</code> object. This 
        *   <code>DOMBuilder</code> is either synchronous or asynchronous 
  -     *   depending on the value of the <code>mode</code> argument.
  +     *   depending on the value of the <code>mode</code> argument.  By 
  +     *   default, the newly created <code>DOMBuilder</code> does not contain 
  +     *   a <code>DOMErrorHandler</code>, i.e. the value of the 
  +     *   <code>errorHandler</code> is <code>null</code>. However, 
  +     *   implementations may provide a default error handler at creation 
  +     *   time. In that case, the initial value of the 
  +     *   <code>errorHandler</code> attribute on the new created 
  +     *   <code>DOMBuilder</code> contains a reference to the default error 
  +     *   handler. 
        * @exception DOMException
        *    NOT_SUPPORTED_ERR: Raised if the requested mode or schema type is 
        *   not supported. 
  @@ -81,7 +91,15 @@
       /**
        * Create a new <code>DOMWriter</code> object. <code>DOMWriter</code>s are 
        * used to serialize a DOM tree back into an XML document. 
  -     * @return The newly created <code>DOMWriter</code> object.
  +     * @return The newly created <code>DOMWriter</code> object. By default, 
  +     *   the newly created <code>DOMWriter</code> does not contain a 
  +     *   <code>DOMErrorHandler</code>, i.e. the value of the 
  +     *   <code>errorHandler</code> is <code>null</code>. However, 
  +     *   implementations may provide a default error handler at creation 
  +     *   time. In that case, the initial value of the 
  +     *   <code>errorHandler</code> attribute on the new created 
  +     *   <code>DOMWriter</code> contains a reference to the default error 
  +     *   handler. 
        */
       public DOMWriter createDOMWriter();
   
  
  
  
  1.3       +6 -7      xml-xerces/java/src/org/w3c/dom/ls/DOMInputSource.java
  
  Index: DOMInputSource.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/DOMInputSource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DOMInputSource.java       19 Jun 2002 22:26:25 -0000      1.2
  +++ DOMInputSource.java       26 Aug 2002 21:51:19 -0000      1.3
  @@ -13,12 +13,11 @@
   package org.w3c.dom.ls;
   
   /**
  - * DOM Level 3 WD Experimental:
  +  * DOM Level 3 WD Experimental:
    * The DOM Level 3 specification is at the stage 
    * of Working Draft, which represents work in 
    * progress and thus may be updated, replaced, 
    * or obsoleted by other documents at any time. 
  - * <p>
    * This interface represents a single input source for an XML entity. 
    * <p> This interface allows an application to encapsulate information about 
    * an input source in a single object, which may include a public 
  @@ -39,9 +38,9 @@
    * connection to the resource identified by the system identifier. 
    * <p> A <code>DOMInputSource</code> object belongs to the application: the 
    * parser shall never modify it in any way (it may modify a copy if 
  - * necessary).  Eventhough all attributes in this interface are writable the 
  - * DOM implementation is expected to never mutate a DOMInputSource. 
  - * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409'>Document Object Model 
(DOM) Level 3 Abstract Schemas and Load
  + * necessary).  Even though all attributes in this interface are writable 
  + * the DOM implementation is expected to never mutate a DOMInputSource. 
  + * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>Document Object Model 
(DOM) Level 3 Load
   and Save Specification</a>.
    */
   public interface DOMInputSource {
  @@ -113,7 +112,7 @@
        * <br>This attribute has no effect when the application provides a 
        * character stream. For other sources of input, an encoding specified 
        * by means of this attribute will override any encoding specified in 
  -     * the XML claration or the Text Declaration, or an encoding obtained 
  +     * the XML declaration or the Text declaration, or an encoding obtained 
        * from a higher level protocol, such as HTTP .
        */
       public String getEncoding();
  @@ -124,7 +123,7 @@
        * <br>This attribute has no effect when the application provides a 
        * character stream. For other sources of input, an encoding specified 
        * by means of this attribute will override any encoding specified in 
  -     * the XML claration or the Text Declaration, or an encoding obtained 
  +     * the XML declaration or the Text declaration, or an encoding obtained 
        * from a higher level protocol, such as HTTP .
        */
       public void setEncoding(String encoding);
  
  
  
  1.4       +60 -42    xml-xerces/java/src/org/w3c/dom/ls/DOMWriter.java
  
  Index: DOMWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/DOMWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DOMWriter.java    23 Aug 2002 20:14:40 -0000      1.3
  +++ DOMWriter.java    26 Aug 2002 21:51:19 -0000      1.4
  @@ -17,21 +17,21 @@
   import org.apache.xerces.dom3.DOMErrorHandler;
   
   /**
  - * DOM Level 3 WD Experimental:
  +  * DOM Level 3 WD Experimental:
    * The DOM Level 3 specification is at the stage 
    * of Working Draft, which represents work in 
    * progress and thus may be updated, replaced, 
    * or obsoleted by other documents at any time. 
  - * <p>
    *  <code>DOMWriter</code> provides an API for serializing (writing) a DOM 
    * document out in an XML document. The XML data is written to an output 
    * stream, the type of which depends on the specific language bindings in 
    * use. 
  - * <p> During serialization of XML data, namespace fixup is done when 
  - * possible.  allows empty strings as a real namespace URI. If the 
  - * <code>namespaceURI</code> of a <code>Node</code> is empty string, the 
  - * serialization will treat them as <code>null</code>, ignoring the prefix 
  - * if any. 
  + * <p> During serialization of XML data, namespace fixup is done when possible 
  + * as defined in , Appendix B.  allows empty strings as a real namespace 
  + * URI. If the <code>namespaceURI</code> of a <code>Node</code> is empty 
  + * string, the serialization will treat them as <code>null</code>, ignoring 
  + * the prefix if any. should the remark on DOM Level 2 namespace URI 
  + * included in the namespace algorithm in Core instead?
    * <p> <code>DOMWriter</code> accepts any node type for serialization. For 
    * nodes of type <code>Document</code> or <code>Entity</code>, well formed 
    * XML will be created if possible. The serialized output for these node 
  @@ -128,10 +128,6 @@
    * <dd> This feature is equivalent to the 
    * one provided on <code>Document.setNormalizationFeature</code> in . </dd>
    * <dt>
  - * <code>"entities"</code></dt>
  - * <dd> This feature is equivalent to the one provided on 
  - * <code>Document.setNormalizationFeature</code> in . </dd>
  - * <dt>
    * <code>"canonical-form"</code></dt>
    * <dd>
    * <dl>
  @@ -144,19 +140,27 @@
    * <dd>[required] (default) Do not canonicalize the 
    * output. </dd>
    * </dl></dd>
  - * <dt><code>"format-pretty-print"</code></dt>
  + * <dt><code>"entities"</code></dt>
  + * <dd> This feature is equivalent to the one 
  + * provided on <code>Document.setNormalizationFeature</code> in . </dd>
  + * <dt>
  + * <code>"format-pretty-print"</code></dt>
    * <dd>
    * <dl>
    * <dt><code>true</code></dt>
  - * <dd>[optional] 
  - * Formatting the output by adding whitespace to produce a pretty-printed, 
  - * indented, human-readable form. The exact form of the transformations is 
  - * not specified by this specification. Setting this feature to true will 
  - * set the feature "canonical-form" to false. </dd>
  + * <dd>[optional] Formatting 
  + * the output by adding whitespace to produce a pretty-printed, indented, 
  + * human-readable form. The exact form of the transformations is not 
  + * specified by this specification. Setting this feature to true will set 
  + * the feature "canonical-form" to false. </dd>
    * <dt><code>false</code></dt>
    * <dd>[required] (
    * default) Don't pretty-print the result. </dd>
    * </dl></dd>
  + * <dt><code>"namespaces"</code></dt>
  + * <dd> This 
  + * feature is equivalent to the one provided on 
  + * <code>Document.setNormalizationFeature</code> in . </dd>
    * <dt>
    * <code>"normalize-characters"</code></dt>
    * <dd> This feature is equivalent to the one 
  @@ -167,15 +171,30 @@
    * <dd> This feature is equivalent to the one 
    * provided on <code>Document.setNormalizationFeature</code> in . </dd>
    * <dt>
  - * <code>"validation"</code></dt>
  - * <dd> This feature is equivalent to the one provided 
  - * on <code>Document.setNormalizationFeature</code> in . </dd>
  + * <code>"validate"</code></dt>
  + * <dd> This feature is equivalent to the one provided on 
  + * <code>Document.setNormalizationFeature</code> in . </dd>
    * <dt>
  - * <code>"whitespace-in-element-content"</code></dt>
  - * <dd> This feature is equivalent 
  - * to the one provided on <code>Document.setNormalizationFeature</code> in . </dd>
  + * <code>"unknown-characters"</code></dt>
  + * <dd>
  + * <dl>
  + * <dt><code>true</code></dt>
  + * <dd>[required] (default) 
  + * If, while verifying full normalization when XML 1.1 is supported, a 
  + * character is encountered for which the normalization properties cannot be 
  + * determined, then ignore any possible denormalizations caused by these 
  + * characters. </dd>
  + * <dt><code>false</code></dt>
  + * <dd>[optional] Report an fatal error if a 
  + * character is encountered for which the processor can not determine the 
  + * normalization properties. </dd>
  + * </dl></dd>
  + * <dt><code>"whitespace-in-element-content"</code></dt>
  + * <dd> 
  + * This feature is equivalent to the one provided on 
  + * <code>Document.setNormalizationFeature</code> in . </dd>
    * </dl>
  - * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409'>Document Object Model 
(DOM) Level 3 Abstract Schemas and Load
  + * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>Document Object Model 
(DOM) Level 3 Load
   and Save Specification</a>.
    */
   public interface DOMWriter {
  @@ -262,19 +281,21 @@
        * end-of-line sequence. DOM implementations should choose the default 
        * to match the usual convention for text files in the environment being 
        * used. Implementations must choose a default sequence that matches one 
  -     * of those allowed by  2.11 "End-of-Line Handling". </dd>
  +     * of those allowed by "End-of-Line Handling" (, section 2.11) if the 
  +     * serialized content is XML 1.0 or "End-of-Line Handling" (, section 
  +     * 2.11) if the serialized content is XML 1.1. </dd>
        * <dt>CR</dt>
  -     * <dd>The 
  -     * carriage-return character (#xD).</dd>
  +     * <dd>The carriage-return 
  +     * character (#xD).</dd>
        * <dt>CR-LF</dt>
  -     * <dd> The carriage-return and 
  -     * line-feed characters (#xD #xA). </dd>
  +     * <dd> The carriage-return and line-feed characters 
  +     * (#xD #xA). </dd>
        * <dt>LF</dt>
        * <dd> The line-feed character (#xA). </dd>
        * </dl>
        * <br>The default value for this attribute is <code>null</code>.
        */
  -    public String getNewLine();
  +    public String getNewLine();   
       /**
        *  The end-of-line sequence of characters to be used in the XML being 
        * written out. Any string is supported, but these are the recommended 
  @@ -287,13 +308,15 @@
        * end-of-line sequence. DOM implementations should choose the default 
        * to match the usual convention for text files in the environment being 
        * used. Implementations must choose a default sequence that matches one 
  -     * of those allowed by  2.11 "End-of-Line Handling". </dd>
  +     * of those allowed by "End-of-Line Handling" (, section 2.11) if the 
  +     * serialized content is XML 1.0 or "End-of-Line Handling" (, section 
  +     * 2.11) if the serialized content is XML 1.1. </dd>
        * <dt>CR</dt>
  -     * <dd>The 
  -     * carriage-return character (#xD).</dd>
  +     * <dd>The carriage-return 
  +     * character (#xD).</dd>
        * <dt>CR-LF</dt>
  -     * <dd> The carriage-return and 
  -     * line-feed characters (#xD #xA). </dd>
  +     * <dd> The carriage-return and line-feed characters 
  +     * (#xD #xA). </dd>
        * <dt>LF</dt>
        * <dd> The line-feed character (#xA). </dd>
        * </dl>
  @@ -350,20 +373,15 @@
        * @return  Returns <code>true</code> if <code>node</code> was 
        *   successfully serialized and <code>false</code> in case a failure 
        *   occured and the failure wasn't canceled by the error handler. 
  -     * @exception DOMSystemException
  -     *   This exception will be raised in response to any sort of IO or system 
  -     *   error that occurs while writing to the destination. It may wrap an 
  -     *   underlying system exception.
        */
       public boolean writeNode(java.io.OutputStream destination, 
  -                             Node wnode)
  -                             throws Exception;
  +                             Node wnode);
   
       /**
        *  Serialize the specified node as described above in the description of 
        * <code>DOMWriter</code>. The result of serializing the node is 
        * returned as a DOMString (this method completely ignores all the 
  -     * encoding information avaliable). Writing a Document or Entity node 
  +     * encoding information available). Writing a Document or Entity node 
        * produces a serialized form that is well formed XML. Writing other 
        * node types produces a fragment of text in a form that is not fully 
        * defined by this document, but that should be useful to a human for 
  
  
  
  1.3       +10 -6     xml-xerces/java/src/org/w3c/dom/ls/DOMWriterFilter.java
  
  Index: DOMWriterFilter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/DOMWriterFilter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DOMWriterFilter.java      19 Jun 2002 22:26:25 -0000      1.2
  +++ DOMWriterFilter.java      26 Aug 2002 21:51:19 -0000      1.3
  @@ -15,25 +15,29 @@
   import org.w3c.dom.traversal.NodeFilter;
   
   /**
  - * DOM Level 3 WD Experimental:
  +  * DOM Level 3 WD Experimental:
    * The DOM Level 3 specification is at the stage 
    * of Working Draft, which represents work in 
    * progress and thus may be updated, replaced, 
    * or obsoleted by other documents at any time. 
  - * <p>
    *  <code>DOMWriterFilter</code>s provide applications the ability to examine 
    * nodes as they are being serialized. <code>DOMWriterFilter</code> lets the 
    * application decide what nodes should be serialized or not. 
  - * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409'>Document Object Model 
(DOM) Level 3 Abstract Schemas and Load
  + * <p> The <code>Document</code>, <code>DocumentType</code>, 
  + * <code>Notation</code>, and <code>Entity</code> nodes are not passed to 
  + * the filter. 
  + * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>Document Object Model 
(DOM) Level 3 Load
   and Save Specification</a>.
    */
   public interface DOMWriterFilter extends NodeFilter {
       /**
        *  Tells the <code>DOMWriter</code> what types of nodes to show to the 
        * filter. See <code>NodeFilter</code> for definition of the constants. 
  -     * The constant <code>SHOW_ATTRIBUTE</code> is meaningless here, 
  -     * attribute nodes will never be passed to a <code>DOMWriterFilter</code>
  -     * . 
  +     * The constants <code>SHOW_ATTRIBUTE</code>, <code>SHOW_DOCUMENT</code>
  +     * , <code>SHOW_DOCUMENT_TYPE</code>, <code>SHOW_NOTATION</code>, and 
  +     * <code>SHOW_DOCUMENT_FRAGMENT</code> are meaningless here, those nodes 
  +     * will never be passed to a <code>DOMWriterFilter</code>. 
  +     * <code>Entity</code> nodes are not passed to the filter. 
        */
       public int getWhatToShow();
   
  
  
  
  1.3       +22 -12    xml-xerces/java/src/org/w3c/dom/ls/DocumentLS.java
  
  Index: DocumentLS.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/DocumentLS.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DocumentLS.java   19 Jun 2002 22:26:25 -0000      1.2
  +++ DocumentLS.java   26 Aug 2002 21:51:19 -0000      1.3
  @@ -16,19 +16,21 @@
   import org.w3c.dom.DOMException;
   
   /**
  - * DOM Level 3 WD Experimental:
  +  * DOM Level 3 WD Experimental:
    * The DOM Level 3 specification is at the stage 
    * of Working Draft, which represents work in 
    * progress and thus may be updated, replaced, 
    * or obsoleted by other documents at any time. 
  - * <p>
  - * The DocumentLS interface provides a mechanism by which the content of a 
  - * document can be replaced with the DOM tree produced when loading a URI, 
  - * or parsing a string. The expectation is that an instance of the 
  - * DocumentLS interface can be obtained by using binding-specific casting 
  - * methods on an instance of the Document interface. 
  - * <p>uses the default features.
  - * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409'>Document Object Model 
(DOM) Level 3 Abstract Schemas and Load
  + * The <code>DocumentLS</code> interface provides a mechanism by which the 
  + * content of a document can be replaced with the DOM tree produced when 
  + * loading a URI, or parsing a string. The expectation is that an instance 
  + * of the <code>DocumentLS</code> interface can be obtained by using 
  + * binding-specific casting methods on an instance of the 
  + * <code>Document</code> interface or, if the <code>Document</code> supports 
  + * the feature <code>"Core"</code> version <code>"3.0"</code> defined in , 
  + * by using the method <code>Node.getInterface</code> with parameter values 
  + * <code>"LS-Load"</code> and <code>"3.0"</code> (respectively). 
  + * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>Document Object Model 
(DOM) Level 3 Load
   and Save Specification</a>.
    */
   public interface DocumentLS {
  @@ -80,6 +82,9 @@
        * caller knows that the load failed (see <code>ParseErrorEvent</code>). 
        * If this method is called on a document that is currently loading, the 
        * current load is interrupted and the new URI load is initiated.
  +     * <br>When invoking this method the features used in the 
  +     * <code>DOMBuilder</code> interface are assumed to have their default 
  +     * values with the exception that the feature "entities" is "false".
        * @param uri The URI reference for the XML file to be loaded. If this is 
        *   a relative URI, the base URI used by the implementation is 
        *   implementation dependent.
  @@ -99,6 +104,8 @@
        * input string, this method is always synchronous. This method always 
        * parses from a DOMString, which means the data is always UTF16. All 
        * other encoding information is ignored. 
  +     * <br>The features used in the <code>DOMBuilder</code> interface are 
  +     * assumed to have their default values when invoking this method.
        * @param source A string containing an XML document.
        * @return <code>true</code> if parsing the input string succeeded 
        *   without errors, otherwise <code>false</code>.
  @@ -106,12 +113,15 @@
       public boolean loadXML(String source);
   
       /**
  -     * Save the document or the given node to a string (i.e. serialize the 
  -     * document or node).
  +     * Save the document or the given node and all its descendants to a string 
  +     * (i.e. serialize the document or node). 
  +     * <br>The features used in the <code>DOMWriter</code> interface are 
  +     * assumed to have their default values when invoking this method. 
        * @param snode Specifies what to serialize, if this parameter is 
        *   <code>null</code> the whole document is serialized, if it's 
        *   non-null the given node is serialized.
  -     * @return The serialized document or <code>null</code>.
  +     * @return The serialized document or <code>null</code> in case an error 
  +     *   occured.
        * @exception DOMException
        *   WRONG_DOCUMENT_ERR: Raised if the node passed in as the node 
        *   parameter is from an other document.
  
  
  
  1.3       +2 -3      xml-xerces/java/src/org/w3c/dom/ls/LSLoadEvent.java
  
  Index: LSLoadEvent.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSLoadEvent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LSLoadEvent.java  19 Jun 2002 22:26:25 -0000      1.2
  +++ LSLoadEvent.java  26 Aug 2002 21:51:19 -0000      1.3
  @@ -16,15 +16,14 @@
   import org.w3c.dom.events.Event;
   
   /**
  - * DOM Level 3 WD Experimental:
  +  * DOM Level 3 WD Experimental:
    * The DOM Level 3 specification is at the stage 
    * of Working Draft, which represents work in 
    * progress and thus may be updated, replaced, 
    * or obsoleted by other documents at any time. 
  - * <p>
    *  This interface represents a load event object that signals the completion 
    * of a document load. 
  - * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409'>Document Object Model 
(DOM) Level 3 Abstract Schemas and Load
  + * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>Document Object Model 
(DOM) Level 3 Load
   and Save Specification</a>.
    */
   public interface LSLoadEvent extends Event {
  
  
  
  1.3       +2 -3      xml-xerces/java/src/org/w3c/dom/ls/LSProgressEvent.java
  
  Index: LSProgressEvent.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSProgressEvent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LSProgressEvent.java      19 Jun 2002 22:26:25 -0000      1.2
  +++ LSProgressEvent.java      26 Aug 2002 21:51:19 -0000      1.3
  @@ -14,17 +14,16 @@
   
   import org.w3c.dom.events.Event;
   
  -/**
  +/** 
    * DOM Level 3 WD Experimental:
    * The DOM Level 3 specification is at the stage 
    * of Working Draft, which represents work in 
    * progress and thus may be updated, replaced, 
    * or obsoleted by other documents at any time. 
  - * <p>
    *  This interface represents a progress event object that notifies the 
    * application about progress as a document is parsed. It extends the 
    * <code>Event</code> interface defined in .
  - * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409'>Document Object Model 
(DOM) Level 3 Abstract Schemas and Load
  + * <p>See also the <a 
href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>Document Object Model 
(DOM) Level 3 Load
   and Save Specification</a>.
    */
   public interface LSProgressEvent extends Event {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to