Dead
[official-gcc.git] / gomp-20050608-branch / libjava / classpath / external / w3c_dom / org / w3c / dom / css / CSSCharsetRule.java
blob8c0defa47538784349e87d504bdb15541f49bd82
1 /*
2 * Copyright (c) 2000 World Wide Web Consortium,
3 * (Massachusetts Institute of Technology, Institut National de
4 * Recherche en Informatique et en Automatique, Keio University). All
5 * Rights Reserved. This program is distributed under the W3C's Software
6 * Intellectual Property License. This program is distributed in the
7 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 * PURPOSE.
10 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
13 package org.w3c.dom.css;
15 import org.w3c.dom.DOMException;
17 /**
18 * The <code>CSSCharsetRule</code> interface represents a @charset rule in a
19 * CSS style sheet. The value of the <code>encoding</code> attribute does
20 * not affect the encoding of text data in the DOM objects; this encoding is
21 * always UTF-16. After a stylesheet is loaded, the value of the
22 * <code>encoding</code> attribute is the value found in the
23 * <code>@charset</code> rule. If there was no <code>@charset</code> in the
24 * original document, then no <code>CSSCharsetRule</code> is created. The
25 * value of the <code>encoding</code> attribute may also be used as a hint
26 * for the encoding used on serialization of the style sheet.
27 * <p> The value of the @charset rule (and therefore of the
28 * <code>CSSCharsetRule</code>) may not correspond to the encoding the
29 * document actually came in; character encoding information e.g. in an HTTP
30 * header, has priority (see CSS document representation) but this is not
31 * reflected in the <code>CSSCharsetRule</code>.
32 * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
33 * @since DOM Level 2
35 public interface CSSCharsetRule extends CSSRule {
36 /**
37 * The encoding information used in this <code>@charset</code> rule.
39 public String getEncoding();
40 /**
41 * The encoding information used in this <code>@charset</code> rule.
42 * @exception DOMException
43 * SYNTAX_ERR: Raised if the specified encoding value has a syntax error
44 * and is unparsable.
45 * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding rule is
46 * readonly.
48 public void setEncoding(String encoding)
49 throws DOMException;