CARVIEW |
Select Language
HTTP/2 200
date: Tue, 07 Oct 2025 07:51:17 GMT
content-type: text/plain
content-length: 20808
cf-ray: 98abcff8d98b9dfa-BLR
last-modified: Mon, 26 Jan 2004 22:31:28 GMT
etag: "1bb50-3d1d9549fd000-gzip"
cache-control: max-age=31536000
expires: Wed, 07 Oct 2026 07:51:17 GMT
vary: Accept-Encoding,Origin
content-encoding: gzip
access-control-allow-origin: *
x-backend: www-mirrors
x-request-id: 98abcff8d98b9dfa
strict-transport-security: max-age=15552000; includeSubdomains; preload
content-security-policy: frame-ancestors 'self' https://cms.w3.org/ https://cms-dev.w3.org/; upgrade-insecure-requests
cf-cache-status: BYPASS
accept-ranges: bytes
set-cookie: __cf_bm=gTGdxYYv7pzDPMEptakDsebYjAgrUlvjUymnyMnFLeY-1759823477-1.0.1.1-wwdnY9Yqabp0M5Dw7EN5G9q6fdew__zRZm00KV5f0fkrrIGIKqd4vXK19NcobJsH68_5RaqNvLgV3PcCZnDLRWZc9r1xZNFL6MEj3i1KEiM; path=/; expires=Tue, 07-Oct-25 08:21:17 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
alt-svc: h3=":443"; ma=86400
>
>
>
>
>
>
>
>
>
>
************ DDooccuummeenntt OObbjjeecctt MMooddeell ((DDOOMM)) LLeevveell 33 VVaalliiddaattiioonn SSppeecciiffiiccaattiioonn ************
********** VVeerrssiioonn 11..00 **********
********** WW33CC RReeccoommmmeennddaattiioonn 2277 JJaannuuaarryy 22000044 **********
This version:
_h_t_t_p_:_/_/_w_w_w_._w_3_._o_r_g_/_T_R_/_2_0_0_4_/_R_E_C_-_D_O_M_-_L_e_v_e_l_-_3_-_V_a_l_-_2_0_0_4_0_1_2_7
Latest version:
_h_t_t_p_:_/_/_w_w_w_._w_3_._o_r_g_/_T_R_/_D_O_M_-_L_e_v_e_l_-_3_-_V_a_l
Previous version:
_h_t_t_p_:_/_/_w_w_w_._w_3_._o_r_g_/_T_R_/_2_0_0_3_/_P_R_-_D_O_M_-_L_e_v_e_l_-_3_-_V_a_l_-_2_0_0_3_1_2_1_5
Editors:
Ben Chang, Oracle
Joe Kesselman, IBM (until September 2001)
Rezaur Rahman, Intel Corporation (until July 2001)
Please refer to the _ee_rr_rr_aa_tt_aa for this document, which may include some normative
corrections.
This document is also available in these non-normative formats: _X_M_L_ _f_i_l_e, _p_l_a_i_n
_t_e_x_t, _P_o_s_t_S_c_r_i_p_t_ _f_i_l_e, _P_D_F_ _f_i_l_e, _s_i_n_g_l_e_ _H_T_M_L_ _f_i_l_e, and _Z_I_P_ _f_i_l_e.
See also _t_r_a_n_s_l_a_t_i_o_n_s of this document.
_C_o_p_y_r_i_g_h_t ?2004 _W_3_C? (_M_I_T, _E_R_C_I_M, _K_e_i_o), All Rights Reserved. W3C _l_i_a_b_i_l_i_t_y,
_t_r_a_d_e_m_a_r_k, _d_o_c_u_m_e_n_t_ _u_s_e and _s_o_f_t_w_a_r_e_ _l_i_c_e_n_s_i_n_g rules apply.
>
********** AAbbssttrraacctt **********
This specification defines the Document Object Model Validation Level 3, a
platform- and language-neutral interface. This module provides the guidance to
programs and scripts to dynamically update the content and the structure of
documents while ensuring that the document remains valid, or to ensure that the
document becomes valid.
********** SSttaattuuss ooff tthhiiss ddooccuummeenntt **********
TThhiiss sseeccttiioonn ddeessccrriibbeess tthhee ssttaattuuss ooff tthhiiss ddooccuummeenntt aatt tthhee ttiimmee ooff iittss
ppuubblliiccaattiioonn.. OOtthheerr ddooccuummeennttss mmaayy ssuuppeerrsseeddee tthhiiss ddooccuummeenntt.. AA lliisstt ooff ccuurrrreenntt WW33CC
ppuubblliiccaattiioonnss aanndd tthhee llaatteesstt rreevviissiioonn ooff tthhiiss tteecchhnniiccaall rreeppoorrtt ccaann bbee ffoouunndd iinn
tthhee _WW_33_CC_ _tt_ee_cc_hh_nn_ii_cc_aa_ll_ _rr_ee_pp_oo_rr_tt_ss_ _ii_nn_dd_ee_xx aatt hhttttpp::////wwwwww..ww33..oorrgg//TTRR//..
This is the _R_e_c_o_m_m_e_n_d_a_t_i_o_n of "DOM Level 3 Validation". No changes were done to
this specification since the Proposed Recommendation version.
Comments on this document should be sent to the public mailing list _w_w_w_-
_d_o_m_@_w_3_._o_r_g. An _a_r_c_h_i_v_e is available at https://lists.w3.org/Archives/Public/www-
dom/.
An _i_m_p_l_e_m_e_n_t_a_t_i_o_n_ _r_e_p_o_r_t, along with the test suite, is also available.
This is a stable document and has been endorsed by the W3C Membership and the
participants of the DOM working group. The English version of this
specification is the only normative version. Information about _t_r_a_n_s_l_a_t_i_o_n_s of
this document is available at https://www.w3.org/2004/01/DOM-Level-3-
translations.
The _l_i_s_t_ _o_f_ _k_n_o_w_n_ _e_r_r_o_r_s in this document is available at https://www.w3.org/
2004/01/DOM-Level-3-errata.
This document has been produced as part of the _W_3_C_ _D_O_M_ _A_c_t_i_v_i_t_y. The authors of
this document are the DOM Working Group participants.
Patent disclosures relevant to this specification may be found on the Working
Group's _p_a_t_e_n_t_ _d_i_s_c_l_o_s_u_r_e_ _p_a_g_e.
********** TTaabbllee ooff ccoonntteennttss **********
* _E_x_p_a_n_d_e_d_ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s
* _W_3_C_ _C_o_p_y_r_i_g_h_t_ _N_o_t_i_c_e_s_ _a_n_d_ _L_i_c_e_n_s_e_s
* _1_._ _V_a_l_i_d_a_t_i_o_n
* _A_p_p_e_n_d_i_x_ _A_:_ _V_a_l_i_d_a_t_i_o_n_ _O_u_t_c_o_m_e_s
* _A_p_p_e_n_d_i_x_ _B_:_ _I_D_L_ _D_e_f_i_n_i_t_i_o_n_s
* _A_p_p_e_n_d_i_x_ _C_:_ _J_a_v_a_ _L_a_n_g_u_a_g_e_ _B_i_n_d_i_n_g
* _A_p_p_e_n_d_i_x_ _D_:_ _E_C_M_A_S_c_r_i_p_t_ _L_a_n_g_u_a_g_e_ _B_i_n_d_i_n_g
* _A_p_p_e_n_d_i_x_ _E_:_ _A_c_k_n_o_w_l_e_d_g_e_m_e_n_t_s
* _G_l_o_s_s_a_r_y
* _R_e_f_e_r_e_n_c_e_s
* _I_n_d_e_x
27 January 2004
************ EExxppaannddeedd TTaabbllee ooff CCoonntteennttss ************
* _E_x_p_a_n_d_e_d_ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s
* _W_3_C_ _C_o_p_y_r_i_g_h_t_ _N_o_t_i_c_e_s_ _a_n_d_ _L_i_c_e_n_s_e_s
o _W_3_C_?_ _D_o_c_u_m_e_n_t_ _C_o_p_y_r_i_g_h_t_ _N_o_t_i_c_e_ _a_n_d_ _L_i_c_e_n_s_e
o _W_3_C_?_ _S_o_f_t_w_a_r_e_ _C_o_p_y_r_i_g_h_t_ _N_o_t_i_c_e_ _a_n_d_ _L_i_c_e_n_s_e
o _W_3_C_?_ _S_h_o_r_t_ _S_o_f_t_w_a_r_e_ _N_o_t_i_c_e
* _1_ _V_a_l_i_d_a_t_i_o_n
o _1_._1_ _O_v_e_r_v_i_e_w
o _1_._2_ _E_x_c_e_p_t_i_o_n_s
o _1_._3_ _D_o_c_u_m_e_n_t_ _E_d_i_t_i_n_g_ _I_n_t_e_r_f_a_c_e_s
* _A_p_p_e_n_d_i_x_ _A_:_ _V_a_l_i_d_a_t_i_o_n_ _O_u_t_c_o_m_e_s
o _A_._1_ _T_h_e_ _n_o_d_e_V_a_l_i_d_i_t_y_ _a_n_d_ _v_a_l_i_d_a_t_e_D_o_c_u_m_e_n_t_ _m_e_t_h_o_d_s
o _A_._2_ _O_t_h_e_r_ _v_a_l_i_d_a_t_i_o_n_ _o_p_e_r_a_t_i_o_n_s
* _A_p_p_e_n_d_i_x_ _B_:_ _I_D_L_ _D_e_f_i_n_i_t_i_o_n_s
* _A_p_p_e_n_d_i_x_ _C_:_ _J_a_v_a_ _L_a_n_g_u_a_g_e_ _B_i_n_d_i_n_g
* _A_p_p_e_n_d_i_x_ _D_:_ _E_C_M_A_S_c_r_i_p_t_ _L_a_n_g_u_a_g_e_ _B_i_n_d_i_n_g
* _A_p_p_e_n_d_i_x_ _E_:_ _A_c_k_n_o_w_l_e_d_g_e_m_e_n_t_s
o _E_._1_ _P_r_o_d_u_c_t_i_o_n_ _S_y_s_t_e_m_s
* _G_l_o_s_s_a_r_y
* _R_e_f_e_r_e_n_c_e_s
* _I_n_d_e_x
27 January 2004
************ WW33CC CCooppyyrriigghhtt NNoottiicceess aanndd LLiicceennsseess ************
CCooppyyrriigghhtt ?? 22000044 _WW_oo_rr_ll_dd_ _WW_ii_dd_ee_ _WW_ee_bb_ _CC_oo_nn_ss_oo_rr_tt_ii_uu_mm,, ((_MM_aa_ss_ss_aa_cc_hh_uu_ss_ee_tt_tt_ss_ _II_nn_ss_tt_ii_tt_uu_tt_ee_ _oo_ff
_TT_ee_cc_hh_nn_oo_ll_oo_gg_yy,, _EE_uu_rr_oo_pp_ee_aa_nn_ _RR_ee_ss_ee_aa_rr_cc_hh_ _CC_oo_nn_ss_oo_rr_tt_ii_uu_mm_ _ff_oo_rr_ _II_nn_ff_oo_rr_mm_aa_tt_ii_cc_ss_ _aa_nn_dd_ _MM_aa_tt_hh_ee_mm_aa_tt_ii_cc_ss,, _KK_ee_ii_oo
_UU_nn_ii_vv_ee_rr_ss_ii_tt_yy)).. AAllll RRiigghhttss RReesseerrvveedd..
This document is published under the _W_3_C_?_ _D_o_c_u_m_e_n_t_ _C_o_p_y_r_i_g_h_t_ _N_o_t_i_c_e_ _a_n_d
_L_i_c_e_n_s_e. The bindings within this document are published under the _W_3_C_?
_S_o_f_t_w_a_r_e_ _C_o_p_y_r_i_g_h_t_ _N_o_t_i_c_e_ _a_n_d_ _L_i_c_e_n_s_e. The software license requires "Notice of
any changes or modifications to the W3C files, including the date changes were
made." Consequently, modified versions of the DOM bindings must document that
they do not conform to the W3C standard; in the case of the IDL definitions,
the pragma prefix can no longer be 'w3c.org'; in the case of the Java language
binding, the package names can no longer be in the 'org.w3c' package.
>
********** WW33CC?? DDooccuummeenntt CCooppyyrriigghhtt NNoottiiccee aanndd LLiicceennssee **********
NNoottee:: This section is a copy of the W3C? Document Notice and License and could
be found at _h_t_t_p_:_/_/_w_w_w_._w_3_._o_r_g_/_C_o_n_s_o_r_t_i_u_m_/_L_e_g_a_l_/_2_0_0_2_/_c_o_p_y_r_i_g_h_t_-_d_o_c_u_m_e_n_t_s_-
_2_0_0_2_1_2_3_1.
CCooppyyrriigghhtt ?? 22000044 _WW_oo_rr_ll_dd_ _WW_ii_dd_ee_ _WW_ee_bb_ _CC_oo_nn_ss_oo_rr_tt_ii_uu_mm,, ((_MM_aa_ss_ss_aa_cc_hh_uu_ss_ee_tt_tt_ss_ _II_nn_ss_tt_ii_tt_uu_tt_ee_ _oo_ff
_TT_ee_cc_hh_nn_oo_ll_oo_gg_yy,, _EE_uu_rr_oo_pp_ee_aa_nn_ _RR_ee_ss_ee_aa_rr_cc_hh_ _CC_oo_nn_ss_oo_rr_tt_ii_uu_mm_ _ff_oo_rr_ _II_nn_ff_oo_rr_mm_aa_tt_ii_cc_ss_ _aa_nn_dd_ _MM_aa_tt_hh_ee_mm_aa_tt_ii_cc_ss,, _KK_ee_ii_oo
_UU_nn_ii_vv_ee_rr_ss_ii_tt_yy)).. AAllll RRiigghhttss RReesseerrvveedd..
hhttttpp::////wwwwww..ww33..oorrgg//CCoonnssoorrttiiuumm//LLeeggaall//22000022//ccooppyyrriigghhtt--ddooccuummeennttss--2200002211223311
Public documents on the W3C site are provided by the copyright holders under
the following license. By using and/or copying this document, or the W3C
document from which this statement is linked, you (the licensee) agree that you
have read, understood, and will comply with the following terms and conditions:
Permission to copy, and distribute the contents of this document, or the W3C
document from which this statement is linked, in any medium for any purpose and
without fee or royalty is hereby granted, provided that you include the
following on AALLLL copies of the document, or portions thereof, that you use:
1. A link or URL to the original W3C document.
2. The pre-existing copyright notice of the original author, or if it
doesn't exist, a notice (hypertext is preferred, but a textual
representation is permitted) of the form: "Copyright ? [$date-of-
document] _W_o_r_l_d_ _W_i_d_e_ _W_e_b_ _C_o_n_s_o_r_t_i_u_m, (_M_a_s_s_a_c_h_u_s_e_t_t_s_ _I_n_s_t_i_t_u_t_e_ _o_f
_T_e_c_h_n_o_l_o_g_y, _E_u_r_o_p_e_a_n_ _R_e_s_e_a_r_c_h_ _C_o_n_s_o_r_t_i_u_m_ _f_o_r_ _I_n_f_o_r_m_a_t_i_c_s_ _a_n_d_ _M_a_t_h_e_m_a_t_i_c_s,
_K_e_i_o_ _U_n_i_v_e_r_s_i_t_y). All Rights Reserved. _h_t_t_p_:_/_/_w_w_w_._w_3_._o_r_g_/_C_o_n_s_o_r_t_i_u_m_/
_L_e_g_a_l_/_2_0_0_2_/_c_o_p_y_r_i_g_h_t_-_d_o_c_u_m_e_n_t_s_-_2_0_0_2_1_2_3_1"
3. IIff iitt eexxiissttss, the STATUS of the W3C document.
When space permits, inclusion of the full text of this NNOOTTIICCEE should be
provided. We request that authorship attribution be provided in any software,
documents, or other items or products that you create pursuant to the
implementation of the contents of this document, or any portion thereof.
No right to create modifications or derivatives of W3C documents is granted
pursuant to this license. However, if additional requirements (documented in
the _C_o_p_y_r_i_g_h_t_ _F_A_Q) are satisfied, the right to create modifications or
derivatives is sometimes granted by the W3C to individuals complying with those
requirements.
THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-
INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY
PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY
THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE
OR IMPLEMENTATION OF THE CONTENTS THEREOF.
The name and trademarks of copyright holders may NOT be used in advertising or
publicity pertaining to this document or its contents without specific, written
prior permission. Title to copyright in this document will at all times remain
with copyright holders.
>
********** WW33CC?? SSooffttwwaarree CCooppyyrriigghhtt NNoottiiccee aanndd LLiicceennssee **********
NNoottee:: This section is a copy of the W3C? Software Copyright Notice and License
and could be found at _h_t_t_p_:_/_/_w_w_w_._w_3_._o_r_g_/_C_o_n_s_o_r_t_i_u_m_/_L_e_g_a_l_/_2_0_0_2_/_c_o_p_y_r_i_g_h_t_-
_s_o_f_t_w_a_r_e_-_2_0_0_2_1_2_3_1
CCooppyyrriigghhtt ?? 22000044 _WW_oo_rr_ll_dd_ _WW_ii_dd_ee_ _WW_ee_bb_ _CC_oo_nn_ss_oo_rr_tt_ii_uu_mm,, ((_MM_aa_ss_ss_aa_cc_hh_uu_ss_ee_tt_tt_ss_ _II_nn_ss_tt_ii_tt_uu_tt_ee_ _oo_ff
_TT_ee_cc_hh_nn_oo_ll_oo_gg_yy,, _EE_uu_rr_oo_pp_ee_aa_nn_ _RR_ee_ss_ee_aa_rr_cc_hh_ _CC_oo_nn_ss_oo_rr_tt_ii_uu_mm_ _ff_oo_rr_ _II_nn_ff_oo_rr_mm_aa_tt_ii_cc_ss_ _aa_nn_dd_ _MM_aa_tt_hh_ee_mm_aa_tt_ii_cc_ss,, _KK_ee_ii_oo
_UU_nn_ii_vv_ee_rr_ss_ii_tt_yy)).. AAllll RRiigghhttss RReesseerrvveedd..
hhttttpp::////wwwwww..ww33..oorrgg//CCoonnssoorrttiiuumm//LLeeggaall//22000022//ccooppyyrriigghhtt--ssooffttwwaarree--2200002211223311
This work (and included software, documentation such as READMEs, or other
related items) is being provided by the copyright holders under the following
license. By obtaining, using and/or copying this work, you (the licensee) agree
that you have read, understood, and will comply with the following terms and
conditions.
Permission to copy, modify, and distribute this software and its documentation,
with or without modification, for any purpose and without fee or royalty is
hereby granted, provided that you include the following on ALL copies of the
software and documentation or portions thereof, including modifications:
1. The full text of this NOTICE in a location viewable to users of the
redistributed or derivative work.
2. Any pre-existing intellectual property disclaimers, notices, or terms and
conditions. If none exist, the _W_3_C_?_ _S_h_o_r_t_ _S_o_f_t_w_a_r_e_ _N_o_t_i_c_e should be
included (hypertext is preferred, text is permitted) within the body of
any redistributed or derivative code.
3. Notice of any changes or modifications to the files, including the date
changes were made. (We recommend you provide URIs to the location from
which the code is derived.)
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
The name and trademarks of copyright holders may NOT be used in advertising or
publicity pertaining to the software without specific, written prior
permission. Title to copyright in this software and any associated
documentation will at all times remain with copyright holders.
********** WW33CC?? SShhoorrtt SSooffttwwaarree NNoottiiccee **********
NNoottee:: This section is a copy of the W3C? Short Software Notice and could be
found at _h_t_t_p_:_/_/_w_w_w_._w_3_._o_r_g_/_C_o_n_s_o_r_t_i_u_m_/_L_e_g_a_l_/_2_0_0_2_/_c_o_p_y_r_i_g_h_t_-_s_o_f_t_w_a_r_e_-_s_h_o_r_t_-
_n_o_t_i_c_e_-_2_0_0_2_1_2_3_1
CCooppyyrriigghhtt ?? 22000044 _WW_oo_rr_ll_dd_ _WW_ii_dd_ee_ _WW_ee_bb_ _CC_oo_nn_ss_oo_rr_tt_ii_uu_mm,, ((_MM_aa_ss_ss_aa_cc_hh_uu_ss_ee_tt_tt_ss_ _II_nn_ss_tt_ii_tt_uu_tt_ee_ _oo_ff
_TT_ee_cc_hh_nn_oo_ll_oo_gg_yy,, _EE_uu_rr_oo_pp_ee_aa_nn_ _RR_ee_ss_ee_aa_rr_cc_hh_ _CC_oo_nn_ss_oo_rr_tt_ii_uu_mm_ _ff_oo_rr_ _II_nn_ff_oo_rr_mm_aa_tt_ii_cc_ss_ _aa_nn_dd_ _MM_aa_tt_hh_ee_mm_aa_tt_ii_cc_ss,, _KK_ee_ii_oo
_UU_nn_ii_vv_ee_rr_ss_ii_tt_yy)).. AAllll RRiigghhttss RReesseerrvveedd..
Copyright ? [$date-of-software] _W_o_r_l_d_ _W_i_d_e_ _W_e_b_ _C_o_n_s_o_r_t_i_u_m, (_M_a_s_s_a_c_h_u_s_e_t_t_s
_I_n_s_t_i_t_u_t_e_ _o_f_ _T_e_c_h_n_o_l_o_g_y, _E_u_r_o_p_e_a_n_ _R_e_s_e_a_r_c_h_ _C_o_n_s_o_r_t_i_u_m_ _f_o_r_ _I_n_f_o_r_m_a_t_i_c_s_ _a_n_d
_M_a_t_h_e_m_a_t_i_c_s, _K_e_i_o_ _U_n_i_v_e_r_s_i_t_y). All Rights Reserved. This work is distributed
under the W3C? Software License [1] in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
[1] https://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
27 January 2004
************ 11.. VVaalliiddaattiioonn ************
Editors:
Ben Chang, Oracle
Joe Kesselman, IBM (until September 2001)
Rezaur Rahman, Intel Corporation (until July 2001)
********** TTaabbllee ooff ccoonntteennttss **********
* _1_._1_ _O_v_e_r_v_i_e_w
* _1_._2_ _E_x_c_e_p_t_i_o_n_s
o _E_x_c_e_p_t_i_o_n_V_A_L, _E_x_c_e_p_t_i_o_n_V_A_L_C_o_d_e
* _1_._3_ _D_o_c_u_m_e_n_t_ _E_d_i_t_i_n_g_ _I_n_t_e_r_f_a_c_e_s
o _D_o_c_u_m_e_n_t_E_d_i_t_V_A_L, _N_o_d_e_E_d_i_t_V_A_L, _E_l_e_m_e_n_t_E_d_i_t_V_A_L, _C_h_a_r_a_c_t_e_r_D_a_t_a_E_d_i_t_V_A_L
********** 11..11 OOvveerrvviieeww **********
This chapter describes the optional DOM Level 3 Validation feature. This module
provides Application Programming Interfaces (APIs) to guide construction and
editing of XML documents. Examples of such guided editing are queries like
those that combine questions like "what does the schema allow me to insert/
delete here" and "if I insert/delete here, will the document still be valid."
To aid users in the editing and creation of XML documents, other queries may
expose different levels of details, e.g., all the possible children, those
which would be valid given what precedes this point, lists of defined symbols
of a given kind. Some of these queries would prompt checks and warn users if
they're about to conflict with or overwrite such data.
Finally, users would like to validate an edited or newly constructed document
before serializing it or passing it to other users. They may edit, come up with
an invalid document, then edit again to result in a valid document. During this
process, these APIs can allow the user to check the validity of the document or
subtree on demand. If necessary, these APIs can also require that the document
or subtree remain valid during this editing process via the
DocumentEditVal.continuousValidityChecking flag.
A DOM application can use the hasFeature(feature, version) method of the
DOMImplementation interface to determine with parameter values "Validation" and
"3.0", respectively, whether or not these interfaces are supported by the
implementation. This implementation is dependent on [_D_O_M_ _L_e_v_e_l_ _2_ _C_o_r_e] and the
[_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e] DOMConfiguration interface.
This chapter focuses on the editing aspects used in the XML document editing
world and usage of such information. The appendix describes in detail all the
possible outcomes of the validation operations on the different node types.
********** 11..22 EExxcceeppttiioonnss **********
This section describes the "VAL-DOC-EDIT" exceptions.
EExxcceeppttiioonn EExxcceeppttiioonnVVAALL
Some Validation operations may throw an _E_x_c_e_p_t_i_o_n_V_A_L as described in
their descriptions.
exception _E_x_c_e_p_t_i_o_n_V_A_L {
unsigned short code;
};
// ExceptionVALCode
const unsigned short _N_O___S_C_H_E_M_A___A_V_A_I_L_A_B_L_E___E_R_R = 71;
>
DDeeffiinniittiioonn ggrroouupp EExxcceeppttiioonnVVAALLCCooddee
An integer indicating the type of error generated.
DDeeffiinneedd CCoonnssttaannttss
NO_SCHEMA_AVAILABLE_ERR
This error occurs when the operation cannot complete
due to an unavailable _s_c_h_e_m_a.
********** 11..33 DDooccuummeenntt EEddiittiinngg IInntteerrffaacceess **********
This section contains "Document Editing" methods as described in the
_D_o_c_u_m_e_n_t_E_d_i_t_V_A_L, _N_o_d_e_E_d_i_t_V_A_L, _E_l_e_m_e_n_t_E_d_i_t_V_A_L, and _C_h_a_r_a_c_t_e_r_D_a_t_a_E_d_i_t_V_A_L
interfaces. References to new [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e] interfaces such as
DOMStringList and NameList also exist. With the latter interface, if the schema
is a DTD, the element information item names are simply local names; if the
schema is a W3C XML schema, the names are qualified names, which may contain
namespace prefixes.
IInntteerrffaaccee DDooccuummeennttEEddiittVVAALL
This interface extends the _N_o_d_e_E_d_i_t_V_A_L interface with additional methods
for document editing. An object implementing this interface must also
implement the Document interface.
interface _D_o_c_u_m_e_n_t_E_d_i_t_V_A_L : _N_o_d_e_E_d_i_t_V_A_L {
attribute boolean _c_o_n_t_i_n_u_o_u_s_V_a_l_i_d_i_t_y_C_h_e_c_k_i_n_g;
// raises(DOMException,
// _E_x_c_e_p_t_i_o_n_V_A_L,
// DOMException) on
setting
readonly attribute DOMConfiguration _d_o_m_C_o_n_f_i_g;
NameList _g_e_t_D_e_f_i_n_e_d_E_l_e_m_e_n_t_s(in DOMString namespaceURI);
unsigned short _v_a_l_i_d_a_t_e_D_o_c_u_m_e_n_t();
};
>
AAttttrriibbuutteess
continuousValidityChecking of type boolean
An attribute specifying whether the validity of the document
is continuously enforced. When the attribute is set to true,
the implementation may raise certain exceptions, depending on
the situation (see the following). This attribute is false by
default.>
EExxcceeppttiioonnss oonn sseettttiinngg
DOMException NOT_SUPPORTED_ERR: Raised if the implementation
does not support setting this attribute to true.
_E_x_c_e_p_t_i_o_n_V_A_L NO_SCHEMA_AVAILABLE_ERR: Raised if this
attribute is set to true and a schema is
unavailable.
DOMException VALIDATION_ERR: Raised if an operation makes
this document not compliant with the
VAL_INCOMPLETE validity type or the document is
invalid, and this attribute is set to true.
domConfig of type DOMConfiguration, readonly
This allows the setting of the error handler, as described in
the [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e] DOMConfiguration interface. An object
implementing this DocumentEditVAL interface and the [_D_O_M
_L_e_v_e_l_ _3_ _C_o_r_e] Document interface, which also has a domConfig
attribute, needs to only implement this attribute once.>
MMeetthhooddss
getDefinedElements
Returns list of all element information item names of _g_l_o_b_a_l
_d_e_c_l_a_r_a_t_i_o_n, belonging to the specified namespace.
PPaarraammeetteerrss
namespaceURI of type DOMString
namespaceURI of namespace. For DTDs, this is null.>
RReettuurrnn VVaalluuee
NameList List of all element information item names belonging
to the specified namespace or null if no schema is
available.
NNoo EExxcceeppttiioonnss
validateDocument
Validates the document against the schema, e.g., a DTD or an
W3C XML schema or another. Any attempt to modify any part of
the document while validating results in implementation-
dependent behavior. In addition, the validation operation
itself cannot modify the document, e.g., for default
attributes. This method makes use of the error handler, as
described in the [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e] DOMConfiguration
interface, with all errors being SEVERITY_ERROR as defined in
the DOMError interface.
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo PPaarraammeetteerrss
NNoo EExxcceeppttiioonnss
IInntteerrffaaccee NNooddeeEEddiittVVAALL
This interface is similar to the [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e] Node interface, with
methods for guided document editing.
interface _N_o_d_e_E_d_i_t_V_A_L {
// validationType
const unsigned short _V_A_L___W_F = 1;
const unsigned short _V_A_L___N_S___W_F = 2;
const unsigned short _V_A_L___I_N_C_O_M_P_L_E_T_E = 3;
const unsigned short _V_A_L___S_C_H_E_M_A = 4;
// validationState
const unsigned short _V_A_L___T_R_U_E = 5;
const unsigned short _V_A_L___F_A_L_S_E = 6;
const unsigned short _V_A_L___U_N_K_N_O_W_N = 7;
readonly attribute DOMString _d_e_f_a_u_l_t_V_a_l_u_e;
readonly attribute DOMStringList _e_n_u_m_e_r_a_t_e_d_V_a_l_u_e_s;
unsigned short _c_a_n_I_n_s_e_r_t_B_e_f_o_r_e(in Node newChild,
in Node refChild);
unsigned short _c_a_n_R_e_m_o_v_e_C_h_i_l_d(in Node oldChild);
unsigned short _c_a_n_R_e_p_l_a_c_e_C_h_i_l_d(in Node newChild,
in Node oldChild);
unsigned short _c_a_n_A_p_p_e_n_d_C_h_i_l_d(in Node newChild);
unsigned short _n_o_d_e_V_a_l_i_d_i_t_y(in unsigned short valType);
};
>
DDeeffiinniittiioonn ggrroouupp vvaalliiddaattiioonnTTyyppee
An integer indicating the validation type. Other specifications can
define stricter validation types/constants by extending the
NodeEditVAL interface.
DDeeffiinneedd CCoonnssttaannttss
VAL_INCOMPLETE
Check if the node's immediate children are those
expected by the content model. This node's trailing
required children could be missing. It includes
VAL_NS_WF.
VAL_NS_WF
Check if the node is _n_a_m_e_s_p_a_c_e_ _w_e_l_l_-_f_o_r_m_e_d.
VAL_SCHEMA
Check if the node's entire subtree are those expected
by the content model. It includes VAL_NS_WF.
VAL_WF
Check if the node is _w_e_l_l_-_f_o_r_m_e_d.
DDeeffiinniittiioonn ggrroouupp vvaalliiddaattiioonnSSttaattee
An integer indicating the validation state, or whether the
operation can or cannot be done.
DDeeffiinneedd CCoonnssttaannttss
VAL_FALSE
False if the node is invalid with regards to the
operation, or if the operation cannot be done.
VAL_TRUE
True if the node is valid with regards to the
operation, or if the operation can be done.
VAL_UNKNOWN
The validity of the node is unknown.
AAttttrriibbuutteess
defaultValue of type DOMString, readonly
The default value specified in an attribute or an element
declaration or null if unspecified. If the schema is a W3C
XML schema, this is the canonical lexical representation of
the default value.>
enumeratedValues of type DOMStringList, readonly
A DOMStringList, as described in [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e], of
distinct values for an attribute or an element declaration or
null if unspecified. If the schema is a W3C XML schema, this
is a list of strings which are lexical representations
corresponding to the values in the [value] property of the
enumeration component for the type of the attribute or
element. It is recommended that the canonical lexical
representations of the values be used.>
MMeetthhooddss
canAppendChild
Determines whether the Node.appendChild operation would make
this document not compliant with the VAL_INCOMPLETE validity
type.
PPaarraammeetteerrss
newChild of type Node
Node to be appended.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
canInsertBefore
Determines whether the Node.insertBefore operation would make
this document not compliant with the VAL_INCOMPLETE validity
type.
PPaarraammeetteerrss
newChild of type Node
Node to be inserted.>
refChild of type Node
Reference Node.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
canRemoveChild
Determines whether the Node.removeChild operation would make
this document not compliant with the VAL_INCOMPLETE validity
type.
PPaarraammeetteerrss
oldChild of type Node
Node to be removed.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
canReplaceChild
Determines whether the Node.replaceChild operation would make
this document not compliant with the VAL_INCOMPLETE validity
type.
PPaarraammeetteerrss
newChild of type Node
New Node.>
oldChild of type Node
Node to be replaced.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
nodeValidity
Determines if the node is valid relative to the _v_a_l_i_d_a_t_i_o_n
_t_y_p_e specified in valType. This operation doesn't normalize
before checking if it is valid. To do so, one would need to
explicitly call a normalize method. The difference between
this method and the _D_o_c_u_m_e_n_t_E_d_i_t_V_A_L_._v_a_l_i_d_a_t_e_D_o_c_u_m_e_n_t method
is that the latter method only checks to determine whether
the entire document is valid.
PPaarraammeetteerrss
valType of type unsigned short
Flag to indicate the _v_a_l_i_d_a_t_i_o_n_ _t_y_p_e checking to be
done.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
IInntteerrffaaccee EElleemmeennttEEddiittVVAALL
This interface extends the _N_o_d_e_E_d_i_t_V_A_L interface with additional methods
for guided document editing. An object implementing this interface must
also implement the Element interface.
This interface also has attributes that are a NameList of elements or
attributes which can appear in the specified context. Some schema
languages, i.e., _W_3_C_ _X_M_L_ _s_c_h_e_m_a, define wildcards which provide for
validation of attribute and element information items dependent on their
namespace names but independent of their local names.
To expose wildcards, the NameList returns the values that represent the
_n_a_m_e_s_p_a_c_e_ _c_o_n_s_t_r_a_i_n_t:
* {namespaceURI, name} is {null, ##any} if aannyy;
* {namespaceURI, name} is {namespace_a, ##other} if nnoott aanndd aa
nnaammeessppaaccee nnaammee ((nnaammeessppaaccee__aa));
* {namespaceURI, name} is {null, ##other} if nnoott aanndd aabbsseenntt;
* Pairs of {namespaceURI, name} with values {a_namespaceURI | null,
null} if aa sseett wwhhoossee mmeemmbbeerrss aarree eeiitthheerr nnaammeessppaaccee nnaammeess oorr aabbsseenntt.
interface _E_l_e_m_e_n_t_E_d_i_t_V_A_L : _N_o_d_e_E_d_i_t_V_A_L {
// ContentTypeVAL
const unsigned short _V_A_L___E_M_P_T_Y___C_O_N_T_E_N_T_T_Y_P_E = 1;
const unsigned short _V_A_L___A_N_Y___C_O_N_T_E_N_T_T_Y_P_E = 2;
const unsigned short _V_A_L___M_I_X_E_D___C_O_N_T_E_N_T_T_Y_P_E = 3;
const unsigned short _V_A_L___E_L_E_M_E_N_T_S___C_O_N_T_E_N_T_T_Y_P_E = 4;
const unsigned short _V_A_L___S_I_M_P_L_E___C_O_N_T_E_N_T_T_Y_P_E = 5;
readonly attribute NameList _a_l_l_o_w_e_d_C_h_i_l_d_r_e_n;
readonly attribute NameList _a_l_l_o_w_e_d_F_i_r_s_t_C_h_i_l_d_r_e_n;
readonly attribute NameList _a_l_l_o_w_e_d_P_a_r_e_n_t_s;
readonly attribute NameList _a_l_l_o_w_e_d_N_e_x_t_S_i_b_l_i_n_g_s;
readonly attribute NameList _a_l_l_o_w_e_d_P_r_e_v_i_o_u_s_S_i_b_l_i_n_g_s;
readonly attribute NameList _a_l_l_o_w_e_d_A_t_t_r_i_b_u_t_e_s;
readonly attribute NameList _r_e_q_u_i_r_e_d_A_t_t_r_i_b_u_t_e_s;
readonly attribute unsigned short _c_o_n_t_e_n_t_T_y_p_e;
unsigned short _c_a_n_S_e_t_T_e_x_t_C_o_n_t_e_n_t(in DOMString
possibleTextContent);
unsigned short _c_a_n_S_e_t_A_t_t_r_i_b_u_t_e(in DOMString attrname,
in DOMString attrval);
unsigned short _c_a_n_S_e_t_A_t_t_r_i_b_u_t_e_N_o_d_e(in Attr attrNode);
unsigned short _c_a_n_S_e_t_A_t_t_r_i_b_u_t_e_N_S(in DOMString namespaceURI,
in DOMString qualifiedName,
in DOMString value);
unsigned short _c_a_n_R_e_m_o_v_e_A_t_t_r_i_b_u_t_e(in DOMString attrname);
unsigned short _c_a_n_R_e_m_o_v_e_A_t_t_r_i_b_u_t_e_N_S(in DOMString
namespaceURI,
in DOMString localName);
unsigned short _c_a_n_R_e_m_o_v_e_A_t_t_r_i_b_u_t_e_N_o_d_e(in Node attrNode);
unsigned short _i_s_E_l_e_m_e_n_t_D_e_f_i_n_e_d(in DOMString name);
unsigned short _i_s_E_l_e_m_e_n_t_D_e_f_i_n_e_d_N_S(in DOMString namespaceURI,
in DOMString name);
};
>
DDeeffiinniittiioonn ggrroouupp CCoonntteennttTTyyppeeVVAALL
An integer indicating the content type of an element.
DDeeffiinneedd CCoonnssttaannttss
VAL_ANY_CONTENTTYPE
The content model contains unordered child information
item(s), i.e., element, processing instruction,
unexpanded entity reference, character, and comment
information items as defined in the _X_M_L_ _I_n_f_o_r_m_a_t_i_o_n
_S_e_t. If the schema is a DTD, this corresponds to the
ANY content model.
VAL_ELEMENTS_CONTENTTYPE
The content model contains a sequence of _e_l_e_m_e_n_t
_i_n_f_o_r_m_a_t_i_o_n_ _i_t_e_m_s optionally separated by whitespace.
If the schema is a DTD, this is the element content
content model; and if the schema is a W3C XML schema,
this is the element-only content type.
VAL_EMPTY_CONTENTTYPE
The content model does not allow any _c_o_n_t_e_n_t. If the
schema is a W3C XML schema, this corresponds to the
empty content type; and if the schema is a DTD, this
corresponds to the EMPTY content model.
VAL_MIXED_CONTENTTYPE
The content model contains a sequence of ordered
_e_l_e_m_e_n_t_ _i_n_f_o_r_m_a_t_i_o_n_ _i_t_e_m_s optionally interspersed with
character data. If the schema is a W3C XML schema, this
corresponds to the mixed content type.
VAL_SIMPLE_CONTENTTYPE
The content model contains _c_h_a_r_a_c_t_e_r_ _i_n_f_o_r_m_a_t_i_o_n_ _i_t_e_m_s.
If the schema is a W3C XML schema, then the element has
a content type of VAL_SIMPLE_CONTENTTYPE if the type of
the element is a simple type definition, or the type of
the element is a complexType whose {content type} is a
simple type definition.
AAttttrriibbuutteess
allowedAttributes of type NameList, readonly
A NameList, as described in [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e], of all
possible attribute information items or _w_i_l_d_c_a_r_d_s that can
appear as attributes of this element, or null if this element
has no context or schema. Duplicate pairs of {namespaceURI,
name} are eliminated.>
allowedChildren of type NameList, readonly
A NameList, as described in [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e], of all
possible element information items or _w_i_l_d_c_a_r_d_s that can
appear as children of this element, or null if this element
has no context or schema. Duplicate pairs of {namespaceURI,
name} are eliminated.>
allowedFirstChildren of type NameList, readonly
A NameList, as described in [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e], of all
possible element information items or _w_i_l_d_c_a_r_d_s that can
appear as a first child of this element, or null if this
element has no context or schema. Duplicate pairs of
{namespaceURI, name} are eliminated.>
allowedNextSiblings of type NameList, readonly
A NameList, as described in [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e], of all
element information items or _w_i_l_d_c_a_r_d_s that can be inserted
as a next sibling of this element, or null if this element
has no context or schema. Duplicate pairs of {namespaceURI,
name} are eliminated.>
allowedParents of type NameList, readonly
A NameList, as described in [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e], of all
possible element information items that can appear as a
parent this element, or null if this element has no context
or schema.>
allowedPreviousSiblings of type NameList, readonly
A NameList, as described in [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e], of all
element information items or _w_i_l_d_c_a_r_d_s that can be inserted
as a previous sibling of this element, or null if this
element has no context or schema.>
contentType of type unsigned short, readonly
The content type of an element as defined _a_b_o_v_e.>
requiredAttributes of type NameList, readonly
A NameList, as described in [_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e], of required
attribute information items that must appear on this element,
or null if this element has no context or schema.>
MMeetthhooddss
canRemoveAttribute
Verifies if an attribute by the given name can be removed.
PPaarraammeetteerrss
attrname of type DOMString
Name of attribute.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
canRemoveAttributeNS
Verifies if an attribute by the given local name and
namespace can be removed.
PPaarraammeetteerrss
namespaceURI of type DOMString
The namespace URI of the attribute to remove.>
localName of type DOMString
Local name of the attribute to be removed.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
canRemoveAttributeNode
Determines if an attribute node can be removed.
PPaarraammeetteerrss
attrNode of type Node
The Attr node to remove from the attribute list.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
canSetAttribute
Determines if the value for specified attribute can be set.
PPaarraammeetteerrss
attrname of type DOMString
Name of attribute.>
attrval of type DOMString
Value to be assigned to the attribute.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
canSetAttributeNS
Determines if the attribute with given namespace and
qualified name can be created if not already present in the
attribute list of the element. If the attribute with the same
qualified name and namespaceURI is already present in the
element's attribute list, it tests whether the value of the
attribute and its prefix can be set to the new value.
PPaarraammeetteerrss
namespaceURI of type DOMString
namespaceURI of namespace.>
qualifiedName of type DOMString
Qualified name of attribute.>
value of type DOMString
Value to be assigned to the attribute.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
canSetAttributeNode
Determines if an attribute node can be added.
PPaarraammeetteerrss
attrNode of type Attr
Node in which the attribute can possibly be set.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
canSetTextContent
Determines if the text content of this node and its
descendants can be set to the string passed in.
PPaarraammeetteerrss
possibleTextContent of type DOMString
Possible text content string.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
isElementDefined
Determines if name is defined in the schema. This only
applies to _g_l_o_b_a_l_ _d_e_c_l_a_r_a_t_i_o_n_s. This method is for non-
namespace aware schemas.
PPaarraammeetteerrss
name of type DOMString
Name of element.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
isElementDefinedNS
Determines if name in this namespace is defined in the
current context. Thus not only does this apply to _g_l_o_b_a_l
_d_e_c_l_a_r_a_t_i_o_n_s. but depending on the content, this may also
apply to local definitions. This method is for namespace
aware schemas.
PPaarraammeetteerrss
namespaceURI of type DOMString
namespaceURI of namespace.>
name of type DOMString
Name of element.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
IInntteerrffaaccee CChhaarraacctteerrDDaattaaEEddiittVVAALL
This interface extends the _N_o_d_e_E_d_i_t_V_A_L interface with additional methods
for document editing. An object implementing this interface must also
implement CharacterData interface. When validating CharacterData nodes,
the _N_o_d_e_E_d_i_t_V_A_L_._n_o_d_e_V_a_l_i_d_i_t_y operation must find the nearest parent node
in order to do this; if no parent node is found, _V_A_L___U_N_K_N_O_W_N is returned.
In addition, when _V_A_L___I_N_C_O_M_P_L_E_T_E is passed in as an argument to the
_N_o_d_e_E_d_i_t_V_A_L_._n_o_d_e_V_a_l_i_d_i_t_y operation to operate on such nodes, the
operation considers all the text and not just some of it.
interface _C_h_a_r_a_c_t_e_r_D_a_t_a_E_d_i_t_V_A_L : _N_o_d_e_E_d_i_t_V_A_L {
unsigned short _i_s_W_h_i_t_e_s_p_a_c_e_O_n_l_y();
unsigned short _c_a_n_S_e_t_D_a_t_a(in DOMString arg);
unsigned short _c_a_n_A_p_p_e_n_d_D_a_t_a(in DOMString arg);
unsigned short _c_a_n_R_e_p_l_a_c_e_D_a_t_a(in unsigned long offset,
in unsigned long count,
in DOMString arg)
raises(DOMException);
unsigned short _c_a_n_I_n_s_e_r_t_D_a_t_a(in unsigned long offset,
in DOMString arg)
raises(DOMException);
unsigned short _c_a_n_D_e_l_e_t_e_D_a_t_a(in unsigned long offset,
in unsigned long count)
raises(DOMException);
};
>
MMeetthhooddss
canAppendData
Determines if character data can be appended.
PPaarraammeetteerrss
arg of type DOMString
Data to be appended.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
canDeleteData
Determines if character data can be deleted.
PPaarraammeetteerrss
offset of type unsigned long
Offset.>
count of type unsigned long
Number of 16-bit units to delete.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
EExxcceeppttiioonnss
DOMException INDEX_SIZE_ERR: Raised if the specified offset
is negative or greater than the number of 16-bit
units in data, or if the specified count is
negative.
canInsertData
Determines if character data can be inserted.
PPaarraammeetteerrss
offset of type unsigned long
Offset.>
arg of type DOMString
Argument to be set.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
EExxcceeppttiioonnss
DOMException INDEX_SIZE_ERR: Raised if the specified offset
is negative or greater than the number of 16-bit
units in data.
canReplaceData
Determines if character data can be replaced.
PPaarraammeetteerrss
offset of type unsigned long
Offset.>
count of type unsigned long
Replacement.>
arg of type DOMString
Argument to be set.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
EExxcceeppttiioonnss
DOMException INDEX_SIZE_ERR: Raised if the specified offset
is negative or greater than the number of 16-bit
units in data, or if the specified count is
negative.
canSetData
Determines if character data can be set.
PPaarraammeetteerrss
arg of type DOMString
Argument to be set.>
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo EExxcceeppttiioonnss
isWhitespaceOnly
Determines if character data is only whitespace.
RReettuurrnn VVaalluuee
unsigned short A _v_a_l_i_d_a_t_i_o_n_ _s_t_a_t_e constant.
NNoo PPaarraammeetteerrss
NNoo EExxcceeppttiioonnss
27 January 2004
************ AAppppeennddiixx AA:: VVaalliiddaattiioonn OOuuttccoommeess ************
Editor:
Ben Chang, Oracle
********** TTaabbllee ooff ccoonntteennttss **********
* _A_._1_ _T_h_e_ _n_o_d_e_V_a_l_i_d_i_t_y_ _a_n_d_ _v_a_l_i_d_a_t_e_D_o_c_u_m_e_n_t_ _m_e_t_h_o_d_s
* _A_._2_ _O_t_h_e_r_ _v_a_l_i_d_a_t_i_o_n_ _o_p_e_r_a_t_i_o_n_s
********** AA..11 TThhee nnooddeeVVaalliiddiittyy aanndd vvaalliiddaatteeDDooccuummeenntt mmeetthhooddss **********
The following table describes all possible validation outcomes of the
_N_o_d_e_E_d_i_t_V_A_L_._n_o_d_e_V_a_l_i_d_i_t_y_(_v_a_l_T_y_p_e_) method.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|VVaalliiddaattiioonn TTyyppee|_VV_aa_ll_ii_dd_ii_tt_yy_ _oo_uu_tt_cc_oo_mm_ee_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_VV_AA_LL____TT_RR_UU_EE_ _ _ _ _ _ _ _ _ _ _ _ _|_VV_AA_LL____FF_AA_LL_SS_EE_ _ _ _ _ _ _ _ _ _ _|_VV_AA_LL____UU_NN_KK_NN_OO_WW_NN_ _ _ _ _ _ _ _ |
|VAL_WF |The node is well- |The node is not |Not applicable. |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_f_o_r_m_e_d_._ _ _ _ _ _ _ _ _ _ _ _ _ _|_w_e_l_l_-_f_o_r_m_e_d_._ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|VAL_NS_WF |The node is well- |The node is not |Not applicable. |
| |formed. Processor |namespace well- | |
| |must take into |formed. Processor | |
| |account all the in- |must take into | |
| |scope namespace |account all the in-| |
| |declarations. |scope namespace | |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_d_e_c_l_a_r_a_t_i_o_n_s_._ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|VAL_NS_WF |The node is well- |The node is not |Not applicable. |
| |formed. Processor |namespace well- | |
| |must take into |formed. Processor | |
| |account all |must take into | |
| |namespace |account all the in-| |
| |declarations in |scope namespace | |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_s_c_o_p_e_._ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_d_e_c_l_a_r_a_t_i_o_n_s_._ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|VAL_SCHEMA |The node is valid: |The node fails to |If the schema is an|
| |it complies with all|comply to all the |XML Schema, PSVI |
| |the constraints |constraints |[[vvaalliiddiittyy]] property|
| |expressed in the |expressed in the |value is unknown. |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_s_c_h_e_m_a_._ _ _ _ _ _ _ _ _ _ _ _ _ _|_s_c_h_e_m_a_._ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|VAL_INCOMPLETE |The node is valid: |The node is invalid|If the schema is an|
| |it complies with the|with regard to the |XML Schema, PSVI |
| |VAL_INCOMPLETE |VAL_INCOMPLETE |[[vvaalliiddiittyy]] property|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_d_e_f_i_n_i_t_i_o_n_._ _ _ _ _ _ _ _ _ _|_d_e_f_i_n_i_t_i_o_n_._ _ _ _ _ _ _ _ _|_v_a_l_u_e_ _i_s_ _u_n_k_n_o_w_n_._ _ |
The following table describes the outcome of the
_D_o_c_u_m_e_n_t_E_d_i_t_V_A_L_._v_a_l_i_d_a_t_e_D_o_c_u_m_e_n_t_(_) and _N_o_d_e_E_d_i_t_V_A_L_._n_o_d_e_V_a_l_i_d_i_t_y_(_v_a_l_T_y_p_e_)
methods, with the latter called on the _D_o_c_u_m_e_n_t_E_d_i_t_V_A_L node with validationType
_N_o_d_e_E_d_i_t_V_A_L_._V_A_L___S_C_H_E_M_A.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|MMeetthhooddss |_VV_aa_ll_ii_dd_ii_tt_yy_ _oo_uu_tt_cc_oo_mm_ee_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_VV_AA_LL____TT_RR_UU_EE_ _ _ _ _ _ _ _ _ _ _|_VV_AA_LL____FF_AA_LL_SS_EE_ _ _ _ _ _ _ _|_VV_AA_LL____UU_NN_KK_NN_OO_WW_NN_ _ _ _ _ _ _ _ |
|validateDocument |If the schema is a|Fails to satisfy|If the schema is an|
|and nodeValidity, |DTD, then the |the constraints |XML Schema, then |
|called on the |document _v_a_l_i_d |defined. |schema is not found|
|Document node with|constraint is | |or the declaration |
|validationType |satisfied. If the | |for the _v_a_l_i_d_a_t_i_o_n |
|VAL_SCHEMA. |schema is an XML | |_r_o_o_t is not found: |
| |Schema, then the | |PSVI [[vvaalliiddiittyy]] |
| |document validity | |_u_n_k_n_o_w_n. |
| |is the same as the| | |
| |validity of the | | |
| |_v_a_l_i_d_a_t_i_o_n_ _r_o_o_t, | | |
| |i.e., | | |
| |documentElement: | | |
| |PSVI [[vvaalliiddiittyy]] | | |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_v_a_l_i_d_._ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
The following table describes outcomes for the _N_o_d_e_E_d_i_t_V_A_L_._n_o_d_e_V_a_l_i_d_i_t_y
_(_v_a_l_T_y_p_e_) method called with the validationType _N_o_d_e_E_d_i_t_V_A_L_._V_A_L___S_C_H_E_M_A:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|NNooddee ttyyppeess |_VV_aa_ll_ii_dd_ii_tt_yy_ _oo_uu_tt_cc_oo_mm_ee_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_VV_AA_LL____TT_RR_UU_EE_ _ _ _ _ _ _ _ _ _ _|_VV_AA_LL____FF_AA_LL_SS_EE_ _ _ _ _ _ _ _|_VV_AA_LL____UU_NN_KK_NN_OO_WW_NN_ _ _ _ _ _ _ _ |
|Element |If the schema is a|Fails to satisfy|If the schema is an|
| |DTD, then _e_l_e_m_e_n_t |the constraints |XML Schema, then |
| |and _a_t_t_r_i_b_u_t_e |defined. |PSVI [[vvaalliiddiittyy]] |
| |validity | |_u_n_k_n_o_w_n. |
| |constraints, | | |
| |including | | |
| |attribute validity| | |
| |constraint defined| | |
| |below are | | |
| |satisfied. If the | | |
| |schema is an XML | | |
| |Schema, then PSVI | | |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_[[_vv_aa_ll_ii_dd_ii_tt_yy_]]_ _v_a_l_i_d_._ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|Attr |If the schema is a|Fails to satisfy|If the schema is an|
| |DTD, then all |the constraints |XML Schema, then |
| |validity |defined. |PSVI [[vvaalliiddiittyy]] |
| |constraints | |_u_n_k_n_o_w_n. |
| |defined in section| | |
| |3.3.1, "_A_t_t_r_i_b_u_t_e | | |
| |_T_y_p_e", _r_e_q_u_i_r_e_d | | |
| |and _f_i_x_e_d | | |
| |attribute are | | |
| |satisfied. If the | | |
| |schema is an XML | | |
| |Schema, then PSVI | | |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_[[_vv_aa_ll_ii_dd_ii_tt_yy_]]_ _v_a_l_i_d_._ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|Text |The node is well- |The node is not |If no parent node |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_f_o_r_m_e_d_._ _ _ _ _ _ _ _ _ _ _ _|_w_e_l_l_-_f_o_r_m_e_d_._ _ _ _ _|_i_s_ _f_o_u_n_d_._ _ _ _ _ _ _ _ _ _ |
|CDATASection |The node is well- |The node is not |If no parent node |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_f_o_r_m_e_d_._ _ _ _ _ _ _ _ _ _ _ _|_w_e_l_l_-_f_o_r_m_e_d_._ _ _ _ _|_i_s_ _f_o_u_n_d_._ _ _ _ _ _ _ _ _ _ |
|ProcessingInstruction|The node is well- |The node is not |If no parent node |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_f_o_r_m_e_d_._ _ _ _ _ _ _ _ _ _ _ _|_w_e_l_l_-_f_o_r_m_e_d_._ _ _ _ _|_i_s_ _f_o_u_n_d_._ _ _ _ _ _ _ _ _ _ |
|Comment |The node is well- |The node is not |If no parent node |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_f_o_r_m_e_d_._ _ _ _ _ _ _ _ _ _ _ _|_w_e_l_l_-_f_o_r_m_e_d_._ _ _ _ _|_i_s_ _f_o_u_n_d_._ _ _ _ _ _ _ _ _ _ |
|EntityReference |Entity is |Entity is not |Not applicable. |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_d_e_c_l_a_r_e_d_._ _ _ _ _ _ _ _ _ _|_d_e_c_l_a_r_e_d_._ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|Entity |Implementation- |Implementation- |Implementation- |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_s_p_e_c_i_f_i_c_._ _ _ _ _ _ _ _ _ _|_s_p_e_c_i_f_i_c_._ _ _ _ _ _ _ _|_s_p_e_c_i_f_i_c_._ _ _ _ _ _ _ _ _ _ |
|Notation |Implementation- |Implementation- |Implementation- |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_s_p_e_c_i_f_i_c_._ _ _ _ _ _ _ _ _ _|_s_p_e_c_i_f_i_c_._ _ _ _ _ _ _ _|_s_p_e_c_i_f_i_c_._ _ _ _ _ _ _ _ _ _ |
|DocumentType |Implementation- |Implementation- |Implementation- |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_s_p_e_c_i_f_i_c_._ _ _ _ _ _ _ _ _ _|_s_p_e_c_i_f_i_c_._ _ _ _ _ _ _ _|_s_p_e_c_i_f_i_c_._ _ _ _ _ _ _ _ _ _ |
|_D_o_c_u_m_e_n_t_F_r_a_g_m_e_n_t_ _ _ _ _ _|_N_o_t_ _a_p_p_l_i_c_a_b_l_e_._ _ _ _|_N_o_t_ _a_p_p_l_i_c_a_b_l_e_._ _|_N_o_t_ _a_p_p_l_i_c_a_b_l_e_._ _ _ _ |
********** AA..22 OOtthheerr vvaalliiddaattiioonn ooppeerraattiioonnss **********
The table below describes validation outcomes from can* validation operations,
such as _N_o_d_e_E_d_i_t_V_A_L_._c_a_n_R_e_m_o_v_e_C_h_i_l_d_(_), or _E_l_e_m_e_n_t_E_d_i_t_V_A_L_._c_a_n_S_e_t_A_t_t_r_i_b_u_t_e_N_S,
_C_h_a_r_a_c_t_e_r_D_a_t_a_E_d_i_t_V_A_L_._c_a_n_A_p_p_e_n_d_D_a_t_a_(_). All these operations attempt to validate
with validityType _N_o_d_e_E_d_i_t_V_A_L_._V_A_L___I_N_C_O_M_P_L_E_T_E.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|_VV_AA_LL____TT_RR_UU_EE_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_VV_AA_LL____FF_AA_LL_SS_EE_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_VV_AA_LL____UU_NN_KK_NN_OO_WW_NN_ _ _ _ |
|If the associated operation is|If the associated operation is|Not applicable.|
|performed, then the node would|performed, then the node would| |
|be valid with regards to the |be invalid with regards to the| |
|VAL_INCOMPLETE definition or |VAL_INCOMPLETE definition. | |
|_i_f_ _t_h_e_r_e_ _i_s_ _n_o_ _s_c_h_e_m_a_ _f_o_u_n_d_._ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
Note: If the document includes more than one type of _s_c_h_e_m_a, e.g., DTD and XML
Schema, and the DOMConfiguration "_ss_cc_hh_ee_mm_aa_--_tt_yy_pp_ee" parameter is not specified, the
validation outcome for _N_o_d_e_E_d_i_t_V_A_L_._V_A_L___I_N_C_O_M_P_L_E_T_E and _N_o_d_e_E_d_i_t_V_A_L_._V_A_L___S_C_H_E_M_A is
implementation-specific.
27 January 2004
************ AAppppeennddiixx BB:: IIDDLL DDeeffiinniittiioonnss ************
This appendix contains the complete OMG IDL [_O_M_G_ _I_D_L] for the Level 3 Document
Object Model Validation definitions.
The IDL files are also available as: _h_t_t_p_:_/_/_w_w_w_._w_3_._o_r_g_/_T_R_/_2_0_0_4_/_R_E_C_-_D_O_M_-_L_e_v_e_l_-_3_-
_V_a_l_-_2_0_0_4_0_1_2_7_/_i_d_l_._z_i_p
******** _vv_aa_ll_ii_dd_aa_tt_ii_oo_nn_.._ii_dd_ll:: ********
// File: validation.idl
#ifndef _VALIDATION_IDL_
#define _VALIDATION_IDL_
#include "dom.idl"
#pragma prefix "dom.w3c.org"
module validation
{
typedef dom::DOMString DOMString;
typedef dom::DOMStringList DOMStringList;
typedef dom::Node Node;
typedef dom::NameList NameList;
typedef dom::Attr Attr;
typedef dom::DOMConfiguration DOMConfiguration;
exception _E_x_c_e_p_t_i_o_n_V_A_L {
unsigned short code;
};
// ExceptionVALCode
const unsigned short _N_O___S_C_H_E_M_A___A_V_A_I_L_A_B_L_E___E_R_R = 71;
interface _N_o_d_e_E_d_i_t_V_A_L {
// validationType
const unsigned short _V_A_L___W_F = 1;
const unsigned short _V_A_L___N_S___W_F = 2;
const unsigned short _V_A_L___I_N_C_O_M_P_L_E_T_E = 3;
const unsigned short _V_A_L___S_C_H_E_M_A = 4;
// validationState
const unsigned short _V_A_L___T_R_U_E = 5;
const unsigned short _V_A_L___F_A_L_S_E = 6;
const unsigned short _V_A_L___U_N_K_N_O_W_N = 7;
readonly attribute DOMString _d_e_f_a_u_l_t_V_a_l_u_e;
readonly attribute DOMStringList _e_n_u_m_e_r_a_t_e_d_V_a_l_u_e_s;
unsigned short _c_a_n_I_n_s_e_r_t_B_e_f_o_r_e(in Node newChild,
in Node refChild);
unsigned short _c_a_n_R_e_m_o_v_e_C_h_i_l_d(in Node oldChild);
unsigned short _c_a_n_R_e_p_l_a_c_e_C_h_i_l_d(in Node newChild,
in Node oldChild);
unsigned short _c_a_n_A_p_p_e_n_d_C_h_i_l_d(in Node newChild);
unsigned short _n_o_d_e_V_a_l_i_d_i_t_y(in unsigned short valType);
};
interface _E_l_e_m_e_n_t_E_d_i_t_V_A_L : _N_o_d_e_E_d_i_t_V_A_L {
// ContentTypeVAL
const unsigned short _V_A_L___E_M_P_T_Y___C_O_N_T_E_N_T_T_Y_P_E = 1;
const unsigned short _V_A_L___A_N_Y___C_O_N_T_E_N_T_T_Y_P_E = 2;
const unsigned short _V_A_L___M_I_X_E_D___C_O_N_T_E_N_T_T_Y_P_E = 3;
const unsigned short _V_A_L___E_L_E_M_E_N_T_S___C_O_N_T_E_N_T_T_Y_P_E = 4;
const unsigned short _V_A_L___S_I_M_P_L_E___C_O_N_T_E_N_T_T_Y_P_E = 5;
readonly attribute NameList _a_l_l_o_w_e_d_C_h_i_l_d_r_e_n;
readonly attribute NameList _a_l_l_o_w_e_d_F_i_r_s_t_C_h_i_l_d_r_e_n;
readonly attribute NameList _a_l_l_o_w_e_d_P_a_r_e_n_t_s;
readonly attribute NameList _a_l_l_o_w_e_d_N_e_x_t_S_i_b_l_i_n_g_s;
readonly attribute NameList _a_l_l_o_w_e_d_P_r_e_v_i_o_u_s_S_i_b_l_i_n_g_s;
readonly attribute NameList _a_l_l_o_w_e_d_A_t_t_r_i_b_u_t_e_s;
readonly attribute NameList _r_e_q_u_i_r_e_d_A_t_t_r_i_b_u_t_e_s;
readonly attribute unsigned short _c_o_n_t_e_n_t_T_y_p_e;
unsigned short _c_a_n_S_e_t_T_e_x_t_C_o_n_t_e_n_t(in DOMString possibleTextContent);
unsigned short _c_a_n_S_e_t_A_t_t_r_i_b_u_t_e(in DOMString attrname,
in DOMString attrval);
unsigned short _c_a_n_S_e_t_A_t_t_r_i_b_u_t_e_N_o_d_e(in Attr attrNode);
unsigned short _c_a_n_S_e_t_A_t_t_r_i_b_u_t_e_N_S(in DOMString namespaceURI,
in DOMString qualifiedName,
in DOMString value);
unsigned short _c_a_n_R_e_m_o_v_e_A_t_t_r_i_b_u_t_e(in DOMString attrname);
unsigned short _c_a_n_R_e_m_o_v_e_A_t_t_r_i_b_u_t_e_N_S(in DOMString namespaceURI,
in DOMString localName);
unsigned short _c_a_n_R_e_m_o_v_e_A_t_t_r_i_b_u_t_e_N_o_d_e(in Node attrNode);
unsigned short _i_s_E_l_e_m_e_n_t_D_e_f_i_n_e_d(in DOMString name);
unsigned short _i_s_E_l_e_m_e_n_t_D_e_f_i_n_e_d_N_S(in DOMString namespaceURI,
in DOMString name);
};
interface _C_h_a_r_a_c_t_e_r_D_a_t_a_E_d_i_t_V_A_L : _N_o_d_e_E_d_i_t_V_A_L {
unsigned short _i_s_W_h_i_t_e_s_p_a_c_e_O_n_l_y();
unsigned short _c_a_n_S_e_t_D_a_t_a(in DOMString arg);
unsigned short _c_a_n_A_p_p_e_n_d_D_a_t_a(in DOMString arg);
unsigned short _c_a_n_R_e_p_l_a_c_e_D_a_t_a(in unsigned long offset,
in unsigned long count,
in DOMString arg)
raises(dom::DOMException);
unsigned short _c_a_n_I_n_s_e_r_t_D_a_t_a(in unsigned long offset,
in DOMString arg)
raises(dom::DOMException);
unsigned short _c_a_n_D_e_l_e_t_e_D_a_t_a(in unsigned long offset,
in unsigned long count)
raises(dom::DOMException);
};
interface _D_o_c_u_m_e_n_t_E_d_i_t_V_A_L : _N_o_d_e_E_d_i_t_V_A_L {
attribute boolean _c_o_n_t_i_n_u_o_u_s_V_a_l_i_d_i_t_y_C_h_e_c_k_i_n_g;
// raises(dom::DOMException,
// _E_x_c_e_p_t_i_o_n_V_A_L,
// dom::DOMException) on setting
readonly attribute DOMConfiguration _d_o_m_C_o_n_f_i_g;
NameList _g_e_t_D_e_f_i_n_e_d_E_l_e_m_e_n_t_s(in DOMString namespaceURI);
unsigned short _v_a_l_i_d_a_t_e_D_o_c_u_m_e_n_t();
};
};
#endif // _VALIDATION_IDL_
27 January 2004
************ AAppppeennddiixx CC:: JJaavvaa LLaanngguuaaggee BBiinnddiinngg ************
This appendix contains the complete Java [_J_a_v_a] bindings for the Level 3
Document Object Model Validation.
The Java files are also available as _h_t_t_p_:_/_/_w_w_w_._w_3_._o_r_g_/_T_R_/_2_0_0_4_/_R_E_C_-_D_O_M_-_L_e_v_e_l_-_3_-
_V_a_l_-_2_0_0_4_0_1_2_7_/_j_a_v_a_-_b_i_n_d_i_n_g_._z_i_p
******** oorrgg//ww33cc//ddoomm//vvaalliiddaattiioonn//EExxcceeppttiioonnVVAALL..jjaavvaa:: ********
package org.w3c.dom.validation;
public class ExceptionVAL extends RuntimeException {
public ExceptionVAL(short code, String message) {
super(message);
this.code = code;
}
public short code;
// ExceptionVALCode
public static final short NO_SCHEMA_AVAILABLE_ERR = 71;
}
******** oorrgg//ww33cc//ddoomm//vvaalliiddaattiioonn//DDooccuummeennttEEddiittVVAALL..jjaavvaa:: ********
package org.w3c.dom.validation;
import org.w3c.dom.DOMConfiguration;
import org.w3c.dom.DOMException;
import org.w3c.dom.NameList;
public interface DocumentEditVAL extends NodeEditVAL {
public boolean getContinuousValidityChecking();
public void setContinuousValidityChecking(boolean
continuousValidityChecking)
throws DOMException, ExceptionVAL, DOMException;
public DOMConfiguration getDomConfig();
public NameList getDefinedElements(String namespaceURI);
public short validateDocument();
}
******** oorrgg//ww33cc//ddoomm//vvaalliiddaattiioonn//NNooddeeEEddiittVVAALL..jjaavvaa:: ********
package org.w3c.dom.validation;
import org.w3c.dom.Node;
import org.w3c.dom.DOMStringList;
public interface NodeEditVAL {
// validationType
public static final short VAL_WF = 1;
public static final short VAL_NS_WF = 2;
public static final short VAL_INCOMPLETE = 3;
public static final short VAL_SCHEMA = 4;
// validationState
public static final short VAL_TRUE = 5;
public static final short VAL_FALSE = 6;
public static final short VAL_UNKNOWN = 7;
public String getDefaultValue();
public DOMStringList getEnumeratedValues();
public short canInsertBefore(Node newChild,
Node refChild);
public short canRemoveChild(Node oldChild);
public short canReplaceChild(Node newChild,
Node oldChild);
public short canAppendChild(Node newChild);
public short nodeValidity(short valType);
}
******** oorrgg//ww33cc//ddoomm//vvaalliiddaattiioonn//EElleemmeennttEEddiittVVAALL..jjaavvaa:: ********
package org.w3c.dom.validation;
import org.w3c.dom.Node;
import org.w3c.dom.Attr;
import org.w3c.dom.NameList;
public interface ElementEditVAL extends NodeEditVAL {
// ContentTypeVAL
public static final short VAL_EMPTY_CONTENTTYPE = 1;
public static final short VAL_ANY_CONTENTTYPE = 2;
public static final short VAL_MIXED_CONTENTTYPE = 3;
public static final short VAL_ELEMENTS_CONTENTTYPE = 4;
public static final short VAL_SIMPLE_CONTENTTYPE = 5;
public NameList getAllowedChildren();
public NameList getAllowedFirstChildren();
public NameList getAllowedParents();
public NameList getAllowedNextSiblings();
public NameList getAllowedPreviousSiblings();
public NameList getAllowedAttributes();
public NameList getRequiredAttributes();
public short getContentType();
public short canSetTextContent(String possibleTextContent);
public short canSetAttribute(String attrname,
String attrval);
public short canSetAttributeNode(Attr attrNode);
public short canSetAttributeNS(String namespaceURI,
String qualifiedName,
String value);
public short canRemoveAttribute(String attrname);
public short canRemoveAttributeNS(String namespaceURI,
String localName);
public short canRemoveAttributeNode(Node attrNode);
public short isElementDefined(String name);
public short isElementDefinedNS(String namespaceURI,
String name);
}
******** oorrgg//ww33cc//ddoomm//vvaalliiddaattiioonn//CChhaarraacctteerrDDaattaaEEddiittVVAALL..jjaavvaa:: ********
package org.w3c.dom.validation;
import org.w3c.dom.DOMException;
public interface CharacterDataEditVAL extends NodeEditVAL {
public short isWhitespaceOnly();
public short canSetData(String arg);
public short canAppendData(String arg);
public short canReplaceData(int offset,
int count,
String arg)
throws DOMException;
public short canInsertData(int offset,
String arg)
throws DOMException;
public short canDeleteData(int offset,
int count)
throws DOMException;
}
27 January 2004
************ AAppppeennddiixx DD:: EECCMMAASSccrriipptt LLaanngguuaaggee BBiinnddiinngg ************
This appendix contains the complete ECMAScript [_E_C_M_A_S_c_r_i_p_t] binding for the
Level 3 Document Object Model Validation definitions.
Properties of the EExxcceeppttiioonnVVAALL Constructor function:
EExxcceeppttiioonnVVAALL..NNOO__SSCCHHEEMMAA__AAVVAAIILLAABBLLEE__EERRRR
The value of the constant EExxcceeppttiioonnVVAALL..NNOO__SSCCHHEEMMAA__AAVVAAIILLAABBLLEE__EERRRR is
7711.
Objects that implement the EExxcceeppttiioonnVVAALL interface:
Properties of objects that implement the EExxcceeppttiioonnVVAALL interface:
ccooddee
This property is a NNuummbbeerr.
Objects that implement the DDooccuummeennttEEddiittVVAALL interface:
Objects that implement the DDooccuummeennttEEddiittVVAALL interface have all
properties and functions of the NNooddeeEEddiittVVAALL interface as well as the
properties and functions defined below.
Properties of objects that implement the DDooccuummeennttEEddiittVVAALL interface:
ccoonnttiinnuuoouussVVaalliiddiittyyCChheecckkiinngg
This property is a BBoooolleeaann and can raise an object that
implements the DDOOMMEExxcceeppttiioonn interface or the EExxcceeppttiioonnVVAALL
interface or the DDOOMMEExxcceeppttiioonn interface on setting.
ddoommCCoonnffiigg
This read-only property is an object that implements the
DDOOMMCCoonnffiigguurraattiioonn interface.
Functions of objects that implement the DDooccuummeennttEEddiittVVAALL interface:
ggeettDDeeffiinneeddEElleemmeennttss((nnaammeessppaacceeUURRII))
This function returns an object that implements the NNaammeeLLiisstt
interface.> The nnaammeessppaacceeUURRII parameter is a SSttrriinngg.
vvaalliiddaatteeDDooccuummeenntt(())
This function returns a NNuummbbeerr.
Properties of the NNooddeeEEddiittVVAALL Constructor function:
NNooddeeEEddiittVVAALL..VVAALL__WWFF
The value of the constant NNooddeeEEddiittVVAALL..VVAALL__WWFF is 11.
NNooddeeEEddiittVVAALL..VVAALL__NNSS__WWFF
The value of the constant NNooddeeEEddiittVVAALL..VVAALL__NNSS__WWFF is 22.
NNooddeeEEddiittVVAALL..VVAALL__IINNCCOOMMPPLLEETTEE
The value of the constant NNooddeeEEddiittVVAALL..VVAALL__IINNCCOOMMPPLLEETTEE is 33.
NNooddeeEEddiittVVAALL..VVAALL__SSCCHHEEMMAA
The value of the constant NNooddeeEEddiittVVAALL..VVAALL__SSCCHHEEMMAA is 44.
NNooddeeEEddiittVVAALL..VVAALL__TTRRUUEE
The value of the constant NNooddeeEEddiittVVAALL..VVAALL__TTRRUUEE is 55.
NNooddeeEEddiittVVAALL..VVAALL__FFAALLSSEE
The value of the constant NNooddeeEEddiittVVAALL..VVAALL__FFAALLSSEE is 66.
NNooddeeEEddiittVVAALL..VVAALL__UUNNKKNNOOWWNN
The value of the constant NNooddeeEEddiittVVAALL..VVAALL__UUNNKKNNOOWWNN is 77.
Objects that implement the NNooddeeEEddiittVVAALL interface:
Properties of objects that implement the NNooddeeEEddiittVVAALL interface:
ddeeffaauullttVVaalluuee
This read-only property is a SSttrriinngg.
eennuummeerraatteeddVVaalluueess
This read-only property is an object that implements the
DDOOMMSSttrriinnggLLiisstt interface.
Functions of objects that implement the NNooddeeEEddiittVVAALL interface:
ccaannIInnsseerrttBBeeffoorree((nneewwCChhiilldd,, rreeffCChhiilldd))
This function returns a NNuummbbeerr.> The nneewwCChhiilldd parameter is an
object that implements the NNooddee interface.> The rreeffCChhiilldd
parameter is an object that implements the NNooddee interface.
ccaannRReemmoovveeCChhiilldd((oollddCChhiilldd))
This function returns a NNuummbbeerr.> The oollddCChhiilldd parameter is an
object that implements the NNooddee interface.
ccaannRReeppllaacceeCChhiilldd((nneewwCChhiilldd,, oollddCChhiilldd))
This function returns a NNuummbbeerr.> The nneewwCChhiilldd parameter is an
object that implements the NNooddee interface.> The oollddCChhiilldd
parameter is an object that implements the NNooddee interface.
ccaannAAppppeennddCChhiilldd((nneewwCChhiilldd))
This function returns a NNuummbbeerr.> The nneewwCChhiilldd parameter is an
object that implements the NNooddee interface.
nnooddeeVVaalliiddiittyy((vvaallTTyyppee))
This function returns a NNuummbbeerr.> The vvaallTTyyppee parameter is a
NNuummbbeerr.
Properties of the EElleemmeennttEEddiittVVAALL Constructor function:
EElleemmeennttEEddiittVVAALL..VVAALL__EEMMPPTTYY__CCOONNTTEENNTTTTYYPPEE
The value of the constant EElleemmeennttEEddiittVVAALL..VVAALL__EEMMPPTTYY__CCOONNTTEENNTTTTYYPPEE is
11.
EElleemmeennttEEddiittVVAALL..VVAALL__AANNYY__CCOONNTTEENNTTTTYYPPEE
The value of the constant EElleemmeennttEEddiittVVAALL..VVAALL__AANNYY__CCOONNTTEENNTTTTYYPPEE is 22.
EElleemmeennttEEddiittVVAALL..VVAALL__MMIIXXEEDD__CCOONNTTEENNTTTTYYPPEE
The value of the constant EElleemmeennttEEddiittVVAALL..VVAALL__MMIIXXEEDD__CCOONNTTEENNTTTTYYPPEE is
33.
EElleemmeennttEEddiittVVAALL..VVAALL__EELLEEMMEENNTTSS__CCOONNTTEENNTTTTYYPPEE
The value of the constant EElleemmeennttEEddiittVVAALL..VVAALL__EELLEEMMEENNTTSS__CCOONNTTEENNTTTTYYPPEE
is 44.
EElleemmeennttEEddiittVVAALL..VVAALL__SSIIMMPPLLEE__CCOONNTTEENNTTTTYYPPEE
The value of the constant EElleemmeennttEEddiittVVAALL..VVAALL__SSIIMMPPLLEE__CCOONNTTEENNTTTTYYPPEE is
55.
Objects that implement the EElleemmeennttEEddiittVVAALL interface:
Objects that implement the EElleemmeennttEEddiittVVAALL interface have all properties
and functions of the NNooddeeEEddiittVVAALL interface as well as the properties
and functions defined below.
Properties of objects that implement the EElleemmeennttEEddiittVVAALL interface:
aalllloowweeddCChhiillddrreenn
This read-only property is an object that implements the
NNaammeeLLiisstt interface.
aalllloowweeddFFiirrssttCChhiillddrreenn
This read-only property is an object that implements the
NNaammeeLLiisstt interface.
aalllloowweeddPPaarreennttss
This read-only property is an object that implements the
NNaammeeLLiisstt interface.
aalllloowweeddNNeexxttSSiibblliinnggss
This read-only property is an object that implements the
NNaammeeLLiisstt interface.
aalllloowweeddPPrreevviioouussSSiibblliinnggss
This read-only property is an object that implements the
NNaammeeLLiisstt interface.
aalllloowweeddAAttttrriibbuutteess
This read-only property is an object that implements the
NNaammeeLLiisstt interface.
rreeqquuiirreeddAAttttrriibbuutteess
This read-only property is an object that implements the
NNaammeeLLiisstt interface.
ccoonntteennttTTyyppee
This read-only property is a NNuummbbeerr.
Functions of objects that implement the EElleemmeennttEEddiittVVAALL interface:
ccaannSSeettTTeexxttCCoonntteenntt((ppoossssiibblleeTTeexxttCCoonntteenntt))
This function returns a NNuummbbeerr.> The ppoossssiibblleeTTeexxttCCoonntteenntt
parameter is a SSttrriinngg.
ccaannSSeettAAttttrriibbuuttee((aattttrrnnaammee,, aattttrrvvaall))
This function returns a NNuummbbeerr.> The aattttrrnnaammee parameter is a
SSttrriinngg.> The aattttrrvvaall parameter is a SSttrriinngg.
ccaannSSeettAAttttrriibbuutteeNNooddee((aattttrrNNooddee))
This function returns a NNuummbbeerr.> The aattttrrNNooddee parameter is an
object that implements the AAttttrr interface.
ccaannSSeettAAttttrriibbuutteeNNSS((nnaammeessppaacceeUURRII,, qquuaalliiffiieeddNNaammee,, vvaalluuee))
This function returns a NNuummbbeerr.> The nnaammeessppaacceeUURRII parameter
is a SSttrriinngg.> The qquuaalliiffiieeddNNaammee parameter is a SSttrriinngg.> The
vvaalluuee parameter is a SSttrriinngg.
ccaannRReemmoovveeAAttttrriibbuuttee((aattttrrnnaammee))
This function returns a NNuummbbeerr.> The aattttrrnnaammee parameter is a
SSttrriinngg.
ccaannRReemmoovveeAAttttrriibbuutteeNNSS((nnaammeessppaacceeUURRII,, llooccaallNNaammee))
This function returns a NNuummbbeerr.> The nnaammeessppaacceeUURRII parameter
is a SSttrriinngg.> The llooccaallNNaammee parameter is a SSttrriinngg.
ccaannRReemmoovveeAAttttrriibbuutteeNNooddee((aattttrrNNooddee))
This function returns a NNuummbbeerr.> The aattttrrNNooddee parameter is an
object that implements the NNooddee interface.
iissEElleemmeennttDDeeffiinneedd((nnaammee))
This function returns a NNuummbbeerr.> The nnaammee parameter is a
SSttrriinngg.
iissEElleemmeennttDDeeffiinneeddNNSS((nnaammeessppaacceeUURRII,, nnaammee))
This function returns a NNuummbbeerr.> The nnaammeessppaacceeUURRII parameter
is a SSttrriinngg.> The nnaammee parameter is a SSttrriinngg.
Objects that implement the CChhaarraacctteerrDDaattaaEEddiittVVAALL interface:
Objects that implement the CChhaarraacctteerrDDaattaaEEddiittVVAALL interface have all
properties and functions of the NNooddeeEEddiittVVAALL interface as well as the
properties and functions defined below.
Functions of objects that implement the CChhaarraacctteerrDDaattaaEEddiittVVAALL interface:
iissWWhhiitteessppaacceeOOnnllyy(())
This function returns a NNuummbbeerr.
ccaannSSeettDDaattaa((aarrgg))
This function returns a NNuummbbeerr.> The aarrgg parameter is a
SSttrriinngg.
ccaannAAppppeennddDDaattaa((aarrgg))
This function returns a NNuummbbeerr.> The aarrgg parameter is a
SSttrriinngg.
ccaannRReeppllaacceeDDaattaa((ooffffsseett,, ccoouunntt,, aarrgg))
This function returns a NNuummbbeerr.> The ooffffsseett parameter is a
NNuummbbeerr.> The ccoouunntt parameter is a NNuummbbeerr.> The aarrgg parameter
is a SSttrriinngg.> This function can raise an object that
implements the DDOOMMEExxcceeppttiioonn interface.
ccaannIInnsseerrttDDaattaa((ooffffsseett,, aarrgg))
This function returns a NNuummbbeerr.> The ooffffsseett parameter is a
NNuummbbeerr.> The aarrgg parameter is a SSttrriinngg.> This function can
raise an object that implements the DDOOMMEExxcceeppttiioonn interface.
ccaannDDeelleetteeDDaattaa((ooffffsseett,, ccoouunntt))
This function returns a NNuummbbeerr.> The ooffffsseett parameter is a
NNuummbbeerr.> The ccoouunntt parameter is a NNuummbbeerr.> This function can
raise an object that implements the DDOOMMEExxcceeppttiioonn interface.
27 January 2004
************ AAppppeennddiixx EE:: AAcckknnoowwlleeddggeemmeennttss ************
Many people contributed to the DOM specifications (Level 1, 2 or 3), including
participants of the DOM Working Group and the DOM Interest Group. We especially
thank the following:
Andrew Clover, Andrew Watson (Object Management Group), Andy Heninger (IBM),
Angel Diaz (IBM), Arnaud Le Hors (W3C and IBM), Ashok Malhotra (IBM and
Microsoft), Ben Chang (Oracle), Bill Smith (Sun), Bill Shea (Merrill Lynch),
Bob Sutor (IBM), Chris Lovett (Microsoft), Chris Wilson (Microsoft), David
Brownell (Sun), David Ezell (Hewlett-Packard Company), David Singer (IBM),
Dimitris Dimitriadis (Improve AB and invited expert), Don Park (invited), Elena
Litani (IBM), Eric Vasilik (Microsoft), Gavin Nicol (INSO), Ian Jacobs (W3C),
James Clark (invited), James Davidson (Sun), Jared Sorensen (Novell), Jeroen
van Rotterdam (X-Hive Corporation), Joe Kesselman (IBM), Joe Lapp (webMethods),
Joe Marini (Macromedia), Johnny Stenback (Netscape/AOL), Jon Ferraiolo (Adobe),
Jonathan Marsh (Microsoft), Jonathan Robie (Texcel Research and Software AG),
Kim Adamson-Sharpe (SoftQuad Software Inc.), Lauren Wood (SoftQuad Software
Inc., ffoorrmmeerr CChhaaiirr), Laurence Cable (Sun), Mark Davis (IBM), Mark Scardina
(Oracle), Martin D?rst (W3C), Mary Brady (NIST), Mick Goulish (Software AG),
Mike Champion (Arbortext and Software AG), Miles Sabin (Cromwell Media), Patti
Lutsky (Arbortext), Paul Grosso (Arbortext), Peter Sharpe (SoftQuad Software
Inc.), Phil Karlton (Netscape), Philippe Le H?garet (W3C, WW33CC TTeeaamm CCoonnttaacctt aanndd
ffoorrmmeerr CChhaaiirr), Ramesh Lekshmynarayanan (Merrill Lynch), Ray Whitmer (iMall,
Excite@Home, and Netscape/AOL, CChhaaiirr), Rezaur Rahman (Intel), Rich Rollman
(Microsoft), Rick Gessner (Netscape), Rick Jelliffe (invited), Rob Relyea
(Microsoft), Scott Isaacs (Microsoft), Sharon Adler (INSO), Steve Byrne
(JavaSoft), Tim Bray (invited), Tim Yu (Oracle), Tom Pixley (Netscape/AOL),
Vidur Apparao (Netscape), Vinod Anupam (Lucent).
Thanks to all those who have helped to improve this specification by sending
suggestions and corrections (Please, keep bugging us with your issues!).
Special thanks to the _D_O_M_ _C_o_n_f_o_r_m_a_n_c_e_ _T_e_s_t_ _S_u_i_t_e_s contributors: Curt Arnold,
Fred Drake, Mary Brady (NIST), Rick Rivello (NIST), Robert Clary (Netscape).
********** EE..11 PPrroodduuccttiioonn SSyysstteemmss **********
This specification was written in XML. The HTML, OMG IDL, Java and ECMAScript
bindings were all produced automatically.
Thanks to Joe English, author of _c_o_s_t, which was used as the basis for
producing DOM Level 1. Thanks also to Gavin Nicol, who wrote the scripts which
run on top of cost. Arnaud Le Hors and Philippe Le H?garet maintained the
scripts.
After DOM Level 1, we used _X_e_r_c_e_s as the basis DOM implementation and wish to
thank the authors. Philippe Le H?garet and Arnaud Le Hors wrote the _J_a_v_a
_p_r_o_g_r_a_m_s which are the DOM application.
Thanks also to Jan K?rrman, author of _h_t_m_l_2_p_s, which we use in creating the
PostScript version of the specification.
27 January 2004
************ GGlloossssaarryy ************
Editors:
Arnaud Le Hors, W3C
Robert S. Sutor, IBM Research (for DOM Level 1)
Some of the following term definitions have been borrowed or modified from
similar definitions in other W3C or standards documents. See the links within
the definitions for more information.
gglloobbaall ddeeccllaarraattiioonn
A global declaration is a schema declaration, usually for an element or
an attribute, that is available for use in content models throughout the
_s_c_h_e_m_a, i.e. a declaration that is not bound to a particular context.
nnaammeessppaaccee wweellll--ffoorrmmeedd
A node is a namespace well-formed XML node if it is a _w_e_l_l_-_f_o_r_m_e_d node,
and follows the productions and namespace constraints. If [_X_M_L_ _1_._0] is
used, the constraints are defined in [_X_M_L_ _N_a_m_e_s_p_a_c_e_s]. If [_X_M_L_ _1_._1] is
used, the constraints are defined in [_X_M_L_ _N_a_m_e_s_p_a_c_e_s_ _1_._1].
sscchheemmaa
A schema defines a set of structural and value constraints applicable to
XML documents. Schemas can be expressed in schema languages, such as DTD,
XML Schema, etc.
wweellll--ffoorrmmeedd
A node is a well-formed XML node if its serialized form, without doing
any transformation during its serialization, matches its respective
production in [_X_M_L_ _1_._0] or [_X_M_L_ _1_._1] (depending on the XML version in
use) with all well-formedness constraints related to that production, and
if the entities which are referenced within the node are also well-
formed. If namespaces for XML are in use, the node must also be _n_a_m_e_s_p_a_c_e
_w_e_l_l_-_f_o_r_m_e_d.
27 January 2004
************ RReeffeerreenncceess ************
For the latest version of any W3C specification please consult the list of _W_3_C
_T_e_c_h_n_i_c_a_l_ _R_e_p_o_r_t_s available at https://www.w3.org/TR.
The references listed in this section are normatives.
[[DDOOMM LLeevveell 22 CCoorree]]
_D_o_c_u_m_e_n_t_ _O_b_j_e_c_t_ _M_o_d_e_l_ _L_e_v_e_l_ _2_ _C_o_r_e_ _S_p_e_c_i_f_i_c_a_t_i_o_n, A. Le Hors, et al.,
Editors. World Wide Web Consortium, 13 November 2000. This version of the
DOM Level 2 Core Recommendation is https://www.w3.org/TR/2000/REC-DOM-
Level-2-Core-20001113. The _l_a_t_e_s_t_ _v_e_r_s_i_o_n_ _o_f_ _D_O_M_ _L_e_v_e_l_ _2_ _C_o_r_e is
available at https://www.w3.org/TR/DOM-Level-2-Core.
[[DDOOMM LLeevveell 33 CCoorree]]
_D_o_c_u_m_e_n_t_ _O_b_j_e_c_t_ _M_o_d_e_l_ _L_e_v_e_l_ _3_ _C_o_r_e_ _S_p_e_c_i_f_i_c_a_t_i_o_n, A. Le Hors, et al.,
Editors. World Wide Web Consortium, January 2004. This version of the
Document Object Model Level 3 Core Specification is https://www.w3.org/TR/
2003/CR-DOM-Level-3-Core-20031107. The _l_a_t_e_s_t_ _v_e_r_s_i_o_n_ _o_f_ _D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e
is available at https://www.w3.org/TR/DOM-Level-3-Core.
[[EECCMMAASSccrriipptt]]
ECMAScript Language Specification, Third Edition. European Computer
Manufacturers Association, Standard ECMA-262, December 1999. This version
of the ECMAScript Language is available from https://www.ecma-
international.org/.
[[JJaavvaa]]
_T_h_e_ _J_a_v_a_ _L_a_n_g_u_a_g_e_ _S_p_e_c_i_f_i_c_a_t_i_o_n, J. Gosling, B. Joy, and G. Steele,
Authors. Addison-Wesley, September 1996. Available at https://
java.sun.com/docs/books/jls
[[OOMMGG IIDDLL]]
"OMG IDL Syntax and Semantics"defined in_T_h_e_ _C_o_m_m_o_n_ _O_b_j_e_c_t_ _R_e_q_u_e_s_t_ _B_r_o_k_e_r_:
_A_r_c_h_i_t_e_c_t_u_r_e_ _a_n_d_ _S_p_e_c_i_f_i_c_a_t_i_o_n_,_ _v_e_r_s_i_o_n_ _2, Object Management Group. The
latest version of CORBA version 2.0 is available at https://www.omg.org/
technology/documents/formal/corba_2.htm.
[[XXMMLL 11..00]]
_E_x_t_e_n_s_i_b_l_e_ _M_a_r_k_u_p_ _L_a_n_g_u_a_g_e_ _(_X_M_L_)_ _1_._0_ _(_S_e_c_o_n_d_ _E_d_i_t_i_o_n_), T. Bray, J. Paoli,
C. M. Sperberg-McQueen, and E. Maler, Editors. World Wide Web Consortium,
10 February 1998, revised 6 October 2000. This version of the XML 1.0
Recommendation is https://www.w3.org/TR/2000/REC-xml-20001006. The _l_a_t_e_s_t
_v_e_r_s_i_o_n_ _o_f_ _X_M_L_ _1_._0 is available at https://www.w3.org/TR/REC-xml.
[[XXMMLL 11..11]]
_X_M_L_ _1_._1, T. Bray, and al., Editors. World Wide Web Consortium, November
2003. This version of the XML 1.1 Specification is https://www.w3.org/TR/
2003/PR-xml11-20031105. The _l_a_t_e_s_t_ _v_e_r_s_i_o_n_ _o_f_ _X_M_L_ _1_._1 is available at
https://www.w3.org/TR/xml11.
[[XXMMLL NNaammeessppaacceess]]
_N_a_m_e_s_p_a_c_e_s_ _i_n_ _X_M_L, T. Bray, D. Hollander, and A. Layman, Editors. World
Wide Web Consortium, 14 January 1999. This version of the XML Information
Set Recommendation is https://www.w3.org/TR/1999/REC-xml-names-19990114.
The _l_a_t_e_s_t_ _v_e_r_s_i_o_n_ _o_f_ _N_a_m_e_s_p_a_c_e_s_ _i_n_ _X_M_L is available at https://
www.w3.org/TR/REC-xml-names.
[[XXMMLL NNaammeessppaacceess 11..11]]
_N_a_m_e_s_p_a_c_e_s_ _i_n_ _X_M_L_ _1_._1, T. Bray, D. Hollander, A. Layman, and R. Tobin,
Editors. World Wide Web Consortium, November 2003. This version of the
XML Information Set Specification is https://www.w3.org/TR/2003/PR-xml-
names11-20031105/. The _l_a_t_e_s_t_ _v_e_r_s_i_o_n_ _o_f_ _N_a_m_e_s_p_a_c_e_s_ _i_n_ _X_M_L is available
at https://www.w3.org/TR/xml-names11/.
27 January 2004
************ IInnddeexx ************
_a_l_l_o_w_e_d_A_t_t_r_i_b_u_t_e_s _a_l_l_o_w_e_d_C_h_i_l_d_r_e_n _a_l_l_o_w_e_d_F_i_r_s_t_C_h_i_l_d_r_e_n
_a_l_l_o_w_e_d_N_e_x_t_S_i_b_l_i_n_g_s _a_l_l_o_w_e_d_P_a_r_e_n_t_s _a_l_l_o_w_e_d_P_r_e_v_i_o_u_s_S_i_b_l_i_n_g_s
_c_a_n_A_p_p_e_n_d_C_h_i_l_d _c_a_n_A_p_p_e_n_d_D_a_t_a _c_a_n_D_e_l_e_t_e_D_a_t_a
_c_a_n_I_n_s_e_r_t_B_e_f_o_r_e _c_a_n_I_n_s_e_r_t_D_a_t_a _c_a_n_R_e_m_o_v_e_A_t_t_r_i_b_u_t_e
_c_a_n_R_e_m_o_v_e_A_t_t_r_i_b_u_t_e_N_o_d_e _c_a_n_R_e_m_o_v_e_A_t_t_r_i_b_u_t_e_N_S _c_a_n_R_e_m_o_v_e_C_h_i_l_d
_c_a_n_R_e_p_l_a_c_e_C_h_i_l_d _c_a_n_R_e_p_l_a_c_e_D_a_t_a _c_a_n_S_e_t_A_t_t_r_i_b_u_t_e
_c_a_n_S_e_t_A_t_t_r_i_b_u_t_e_N_o_d_e _c_a_n_S_e_t_A_t_t_r_i_b_u_t_e_N_S _c_a_n_S_e_t_D_a_t_a
_c_a_n_S_e_t_T_e_x_t_C_o_n_t_e_n_t _C_h_a_r_a_c_t_e_r_D_a_t_a_E_d_i_t_V_A_L _c_o_n_t_e_n_t_T_y_p_e
_c_o_n_t_i_n_u_o_u_s_V_a_l_i_d_i_t_y_C_h_e_c_k_i_n_g
_d_e_f_a_u_l_t_V_a_l_u_e _D_o_c_u_m_e_n_t_E_d_i_t_V_A_L _D_O_M_ _L_e_v_e_l_ _2_ _C_o_r_e _1, _2
_D_O_M_ _L_e_v_e_l_ _3_ _C_o_r_e _1, _2, _3,
_4, _5, _6, _7, _8, _9, _1_0, _1_1, _d_o_m_C_o_n_f_i_g
_1_2, _1_3, _1_4
_E_C_M_A_S_c_r_i_p_t _E_l_e_m_e_n_t_E_d_i_t_V_A_L _e_n_u_m_e_r_a_t_e_d_V_a_l_u_e_s
_E_x_c_e_p_t_i_o_n_V_A_L
_g_e_t_D_e_f_i_n_e_d_E_l_e_m_e_n_t_s _g_l_o_b_a_l_ _d_e_c_l_a_r_a_t_i_o_n _1, _2, _3,
_4
_i_s_E_l_e_m_e_n_t_D_e_f_i_n_e_d _i_s_E_l_e_m_e_n_t_D_e_f_i_n_e_d_N_S _i_s_W_h_i_t_e_s_p_a_c_e_O_n_l_y
_J_a_v_a
_n_a_m_e_s_p_a_c_e_ _w_e_l_l_-_f_o_r_m_e_d _1, _2 _N_O___S_C_H_E_M_A___A_V_A_I_L_A_B_L_E___E_R_R _N_o_d_e_E_d_i_t_V_A_L
_n_o_d_e_V_a_l_i_d_i_t_y
_O_M_G_ _I_D_L
_r_e_q_u_i_r_e_d_A_t_t_r_i_b_u_t_e_s
_s_c_h_e_m_a _1, _2
_V_A_L___A_N_Y___C_O_N_T_E_N_T_T_Y_P_E _V_A_L___E_L_E_M_E_N_T_S___C_O_N_T_E_N_T_T_Y_P_E _V_A_L___E_M_P_T_Y___C_O_N_T_E_N_T_T_Y_P_E
_V_A_L___F_A_L_S_E _V_A_L___I_N_C_O_M_P_L_E_T_E _V_A_L___M_I_X_E_D___C_O_N_T_E_N_T_T_Y_P_E
_V_A_L___N_S___W_F _V_A_L___S_C_H_E_M_A _V_A_L___S_I_M_P_L_E___C_O_N_T_E_N_T_T_Y_P_E
_V_A_L___T_R_U_E _V_A_L___U_N_K_N_O_W_N _V_A_L___W_F
_v_a_l_i_d_a_t_e_D_o_c_u_m_e_n_t
_w_e_l_l_-_f_o_r_m_e_d _1, _2
_X_M_L_ _1_._0 _1, _2, _3 _X_M_L_ _1_._1 _1, _2, _3 _X_M_L_ _N_a_m_e_s_p_a_c_e_s _1, _2
_X_M_L_ _N_a_m_e_s_p_a_c_e_s_ _1_._1 _1, _2