trunk/XMLv2__DOMErrorHandler.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 08 Apr 2008 19:47:42 +0000
changeset 0 5057afe1ec87
permissions -rw-r--r--
Initial import from CVS
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/xmlsuite' }"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"{ NameSpace: XMLv2 }"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
Object subclass:#DOMErrorHandler
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
	instanceVariableNames:''
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	classVariableNames:'Default'
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	poolDictionaries:''
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
	category:'XML Suite-DOM3'
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
!DOMErrorHandler class methodsFor:'documentation'!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
documentation
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
     DOMErrorHandler is a callback interface that the DOM implementation 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
    can call when reporting errors that happens while processing XML data, 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
    or when doing some other processing (e.g. validating a document). 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
    A DOMErrorHandler  object can be attached to a Document using the 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
    'error-handler' on the DOMConfiguration interface. If more than one 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
    error needs to be reported during an operation, the sequence and 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
    numbers of the errors passed to the error handler are 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
    implementation dependent.
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
    The application that is using the DOM implementation is expected 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
    to implement this interface. 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
    [author:]
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
        W3C
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
    [instance variables:]
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
    [class variables:]
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
    [see also:]
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
history
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
    "Created: / 10-08-2005 / 22:40:23 / janfrog"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
! !
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
!DOMErrorHandler class methodsFor:'accessing'!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
default
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
    ^Default ifNil:[Default := self new]
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
    "Created: / 11-08-2005 / 14:22:57 / janfrog"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
    "Modified: / 11-08-2005 / 22:32:02 / janfrog"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
! !
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
!DOMErrorHandler methodsFor:'DOM3 interface'!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
handleError:aDOMError
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
    "
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
    This method is called on the error handler when an error occurs.
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
    If an exception is thrown from this method, it is considered to 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
    be equivalent of returning true.
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
    Parameters
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
        aDOMError
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
            The error object that describes the error. This object may 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
            be reused by the DOM implementation across multiple 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
            calls to the handleError method.
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
    Return Value
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
        boolean
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
            If the handleError method returns false, the DOM 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
            implementation should stop the current processing 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
            when possible. If the method returns true, the 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
            processing may continue depending on aDOMError severity. 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
    "
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
    aDOMError raise
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
    "Created: / 10-08-2005 / 22:42:04 / janfrog"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
! !
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
!DOMErrorHandler class methodsFor:'documentation'!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
version
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
    ^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/XMLv2__DOMErrorHandler.st,v 1.1.1.1 2005-11-01 22:05:43 vranyj1 Exp $'
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
! !