src/java.xml/share/classes/org/w3c/dom/ls/LSParserFilter.java
changeset 48241 18d487a1f933
parent 47216 71c04702a3d5
equal deleted inserted replaced
48240:e9ad230ea455 48241:18d487a1f933
    54  * The document element is never passed to the <code>LSParserFilter</code>
    54  * The document element is never passed to the <code>LSParserFilter</code>
    55  * methods, i.e. it is not possible to filter out the document element.
    55  * methods, i.e. it is not possible to filter out the document element.
    56  * <code>Document</code>, <code>DocumentType</code>, <code>Notation</code>,
    56  * <code>Document</code>, <code>DocumentType</code>, <code>Notation</code>,
    57  * <code>Entity</code>, and <code>Attr</code> nodes are never passed to the
    57  * <code>Entity</code>, and <code>Attr</code> nodes are never passed to the
    58  * <code>acceptNode</code> method on the filter. The child nodes of an
    58  * <code>acceptNode</code> method on the filter. The child nodes of an
    59  * <code>EntityReference</code> node are passed to the filter if the
    59  * <code>EntityReference</code> node are passed to the filter if the parameter
    60  * parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
    60  * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-entities'>entities</a>"
    61  * entities</a>" is set to <code>false</code>. Note that, as described by the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
    61  * is set to <code>false</code>. Note that, as described by the parameter
    62  * entities</a>", unexpanded entity reference nodes are never discarded and are always
    62  * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-entities'>entities</a>",
       
    63  * unexpanded entity reference nodes are never discarded and are always
    63  * passed to the filter.
    64  * passed to the filter.
    64  * <p> All validity checking while parsing a document occurs on the source
    65  * <p> All validity checking while parsing a document occurs on the source
    65  * document as it appears on the input stream, not on the DOM document as it
    66  * document as it appears on the input stream, not on the DOM document as it
    66  * is built in memory. With filters, the document in memory may be a subset
    67  * is built in memory. With filters, the document in memory may be a subset
    67  * of the document on the stream, and its validity may have been affected by
    68  * of the document on the stream, and its validity may have been affected by
    69  * <p> All default attributes must be present on elements when the elements
    70  * <p> All default attributes must be present on elements when the elements
    70  * are passed to the filter methods. All other default content must be
    71  * are passed to the filter methods. All other default content must be
    71  * passed to the filter methods.
    72  * passed to the filter methods.
    72  * <p> DOM applications must not raise exceptions in a filter. The effect of
    73  * <p> DOM applications must not raise exceptions in a filter. The effect of
    73  * throwing exceptions from a filter is DOM implementation dependent.
    74  * throwing exceptions from a filter is DOM implementation dependent.
    74  * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
    75  * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>
    75 and Save Specification</a>.
    76 Document Object Model (DOM) Level 3 Load and Save Specification</a>.
    76  *
    77  *
    77  * @since 1.5
    78  * @since 1.5
    78  */
    79  */
    79 public interface LSParserFilter {
    80 public interface LSParserFilter {
    80     // Constants returned by startElement and acceptNode
    81     // Constants returned by startElement and acceptNode
   193      * definition of the constants. The constants <code>SHOW_ATTRIBUTE</code>
   194      * definition of the constants. The constants <code>SHOW_ATTRIBUTE</code>
   194      * , <code>SHOW_DOCUMENT</code>, <code>SHOW_DOCUMENT_TYPE</code>,
   195      * , <code>SHOW_DOCUMENT</code>, <code>SHOW_DOCUMENT_TYPE</code>,
   195      * <code>SHOW_NOTATION</code>, <code>SHOW_ENTITY</code>, and
   196      * <code>SHOW_NOTATION</code>, <code>SHOW_ENTITY</code>, and
   196      * <code>SHOW_DOCUMENT_FRAGMENT</code> are meaningless here. Those nodes
   197      * <code>SHOW_DOCUMENT_FRAGMENT</code> are meaningless here. Those nodes
   197      * will never be passed to <code>LSParserFilter.acceptNode</code>.
   198      * will never be passed to <code>LSParserFilter.acceptNode</code>.
   198      * <br> The constants used here are defined in [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and      Range</a>]
   199      * <br> The constants used here are defined in
   199      * .
   200      * [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and Range</a>].
   200      */
   201      */
   201     public int getWhatToShow();
   202     public int getWhatToShow();
   202 
   203 
   203 }
   204 }