Checking in Sources/Docs of DOM Level 2 from :

http://www.w3.org/DOM/DOMTM


git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@225913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dims committed 2001-06-01 11:15:37 +00:00
1 parent 7d5c881d20
commit 82b88df622
231 files changed
+66110

No files matched your search

+172
View File
@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--
*************************************************************************
* BEGINNING OF LEVEL TWO CSS *
*************************************************************************
-->
<div1 id="CSS">
<head>Document Object Model CSS</head>
<orglist role="editors">
<member>
<name>Chris Wilson</name>
<affiliation>Microsoft Corp.</affiliation>
</member>
<member>
<name>Philippe Le H&eacute;garet</name>
<affiliation>W3C</affiliation>
</member>
<member>
<name>Vidur Apparao</name>
<affiliation>Netscape Communications Corp.</affiliation>
</member>
</orglist>
<?GENERATE-MINI-TOC?>
<!--
******************************************************
| INTRODUCTION |
******************************************************
-->
<div2 id="CSS-overview">
<head>Overview of the DOM Level 2 CSS Interfaces</head>
<p>
The DOM Level 2 Cascading Style Sheets (<loc href="&CSS;">CSS</loc>)
interfaces are designed with the goal of exposing CSS constructs to
object model consumers. Cascading Style Sheets is a declarative syntax
for defining presentation rules, properties and ancillary constructs used
to format and render Web documents. This document specifies a mechanism
to programmatically access and modify the rich style and presentation
control provided by CSS (specifically CSS level 2 <bibref
ref='CSS2'/>). This augments CSS by providing a mechanism to dynamically
control the inclusion and exclusion of individual style sheets, as well
as manipulate CSS rules and properties.
</p>
<p>
The CSS interfaces are organized in a logical, rather than
physical structure. A collection of all style sheets
referenced by or embedded in the document is accessible on
the document interface. Each item in this collection exposes
the properties common to all style sheets referenced or embedded
in HTML and XML documents; this interface is described in the
<specref ref="StyleSheets"/>. User style sheets are
not accessible through this collection, in part due to potential
privacy concerns (and certainly read-write issues).
</p>
<p>
For each CSS style sheet, an additional interface is exposed - the
<code>CSSStyleSheet</code> interface. This interface allows access to
the collection of rules within a CSS style sheet and methods to modify
that collection. Interfaces are provided for each specific type of rule
in CSS2 (e.g. style declarations, <code>@import</code> rules, or
<code>@font-face</code> rules), as well as a shared generic
<code>CSSRule</code> interface.
</p>
<p>
The most common type of rule is a style declaration. The
<code>CSSStyleRule</code> interface that represents this type of rule
provides string access to the CSS selector of the rule, and access to the
property declarations through the <code>CSSStyleDeclaration</code>
interface.
</p>
<p>
Finally, an optional <code>CSS2Properties</code> interface is described;
this interface (if implemented) provides shortcuts to the string
values of all the properties in CSS level 2.
</p>
<p>
All CSS objects in the DOM are "live", that is, a change in the style sheet
is reflected in the computed and actual style.
</p>
</div2>
<div2 id="CSS-fundamental">
<head>CSS Fundamental Interfaces</head>
<p>
The interfaces within this section are considered fundamental CSS
interfaces, and must be supported by all conforming implementations of
the CSS module. These interfaces represent CSS style sheets specifically.
</p>
<p>
A DOM application may use the <code>hasFeature(feature, version)</code>
method of the <code>DOMImplementation</code> interface with parameter
values "CSS" and "2.0" (respectively) to determine whether or not this
module is supported by the implementation. In order to fully support this
module, an implementation must also support the "Core" feature defined
defined in the DOM Level 2 Core specification <bibref ref="DOMCore"/> and
the "Views" feature defined in the DOM Level 2 Views specification
<bibref ref="DOMViews"/>. Please refer to additional information about
<xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
<definitions>
&css-cssstylesheet;
&css-cssrulelist;
&css-cssrule;
&css-cssstylerule;
&css-cssmediarule;
&css-cssfontfacerule;
&css-csspagerule;
&css-cssimportrule;
&css-csscharsetrule;
&css-cssunknownrule;
&css-cssstyledeclaration;
&css-cssvalue;
&css-cssprimitivevalue;
&css-cssvaluelist;
&css-rgbcolor;
&css-rect;
&css-counter;
</definitions>
<div3 id="CSS-OverrideAndComputed">
<head>Override and computed style sheet</head>
<definitions>
&css-viewcss;
&css-documentcss;
</definitions>
</div3>
<div3 id="CSS-StyleSheetCreation">
<head>Style sheet creation</head>
<definitions>
&css-domimplementationcss;
</definitions>
</div3>
<div3 id="CSS-htmlelementcss">
<head>Element with CSS inline style</head>
<definitions>
&css-elementcssinlinestyle;
</definitions>
</div3>
</div2>
<div2 id="CSS-extended">
<head>CSS2 Extended Interface</head>
<p>
The interface found within this section are not mandatory. A DOM
application may use the <code>hasFeature(feature, version)</code> method
of the <code>DOMImplementation</code> interface with parameter values
"CSS2" and "2.0" (respectively) to determine whether or not this module
is supported by the implementation. In order to fully support this
module, an implementation must also support the "CSS" feature defined
defined in <specref ref="CSS-fundamental"/>. Please refer to additional
information about <xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
<definitions>
&css-css2properties;
</definitions>
</div2>
</div1>
<!--
*************************************************************************
* END OF LEVEL TWO CSS *
*************************************************************************
-->
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSCharsetRule interface -->
<interface id="CSS-CSSCharsetRule" name="CSSCharsetRule"
inherits="CSSRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSCharsetRule</code> interface represents a <xspecref
href="&css2;/syndata.html#x66">@charset
rule</xspecref> in a CSS style sheet. The value of the
<code>encoding</code> attribute does not affect the encoding of
text data in the DOM objects; this encoding is always UTF-16. After a
stylesheet is loaded, the value of the <code>encoding</code> attribute is
the value found in the <code>@charset</code> rule. If there was no
<code>@charset</code> in the original document, then no
<code>CSSCharsetRule</code> is created. The value of the
<code>encoding</code> attribute may also be used as a hint for the
encoding used on serialization of the style sheet.
</p>
<p>
The value of the <xspecref href="&css2;/syndata.html#x66">@charset
rule</xspecref> (and therefore of the <code>CSSCharsetRule</code>) may
not correspond to the encoding the document actually came in; character
encoding information e.g. in an HTTP header, has priority (see <xspecref
href="&css2;/syndata.html#x66">CSS document representation</xspecref>) but this is
not reflected in the <code>CSSCharsetRule</code>.
</p>
</descr>
<attribute type="DOMString" readonly="no" name="encoding" id="CSS-CSSCharsetRule-encoding">
<descr>
<p>
The encoding information used in this <code>@charset</code> rule.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified encoding value has a syntax
error and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding rule is
readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
</interface>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSFontFaceRule interface -->
<interface name="CSSFontFaceRule" inherits="CSSRule"
id="CSS-CSSFontFaceRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSFontFaceRule</code> interface represents a <xspecref href="&css2;/fonts.html#font-descriptions">@font-face
rule</xspecref> in a CSS style sheet. The <code>@font-face</code> rule
is used to hold a set of font descriptions.
</p>
</descr>
<attribute type="CSSStyleDeclaration" readonly="yes" name="style" id="CSS-CSSFontFaceRule-style">
<descr>
<p>
The <xspecref href="&css2;/syndata.html#q8">declaration-block</xspecref> of this rule.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSImportRule interface -->
<interface name="CSSImportRule" inherits="CSSRule"
id="CSS-CSSImportRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSImportRule</code> interface represents a <xspecref
href="&css2;/cascade.html#at-import">@import
rule</xspecref> within a CSS style sheet. The <code>@import</code> rule is
used to import style rules from other style sheets.
</p>
</descr>
<attribute id="CSS-CSSImportRule-href" name="href" type="DOMString"
readonly="yes">
<descr>
<p>
The location of the style sheet to be imported. The attribute will not
contain the <code>"url(...)"</code> specifier around the URI.
</p>
</descr>
</attribute>
<attribute id="CSS-CSSImportRule-media" name="media" type="stylesheets::MediaList"
readonly="yes">
<descr>
<p>
A list of media types for which this style sheet may be
used.
</p>
</descr>
</attribute>
<attribute id="CSS-CSSImportRule-styleSheet" name="styleSheet"
type="CSSStyleSheet" readonly="yes">
<descr>
<p>The style sheet referred to by this rule, if it has been loaded. The
value of this attribute is <code>null</code> if the style sheet has not
yet been loaded or if it will not be loaded (e.g. if the style sheet is
for a media type not supported by the user agent).
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSMediaRule interface -->
<interface name="CSSMediaRule" inherits="CSSRule" id="CSS-CSSMediaRule"
since="DOM Level 2">
<descr>
<p>
The <code>CSSMediaRule</code> interface represents a <xspecref href="&css2;/media.html#at-media-rule">@media
rule</xspecref> in a CSS style sheet. A <code>@media</code> rule can be
used to delimit style rules for specific media types.
</p>
</descr>
<attribute id="CSS-CSSMediaRule-mediaTypes" name="media"
type="stylesheets::MediaList" readonly="yes">
<descr>
<p>
A list of <xspecref href="&css2;/media.html#media-types">media types</xspecref> for this rule.
</p>
</descr>
</attribute>
<attribute type="CSSRuleList" readonly="yes" name="cssRules" id="CSS-CSSMediaRule-cssRules">
<descr>
<p>
A list of all CSS rules contained within the media block.
</p>
</descr>
</attribute>
<method name="insertRule" id="CSS-CSSMediaRule-insertRule">
<descr>
<p>
Used to insert a new rule into the media block.
</p>
</descr>
<parameters>
<param name="rule" type="DOMString" attr="in">
<descr>
<p>
The parsable text representing the rule. For rule sets
this contains both the selector and the style declaration.
For at-rules, this specifies both the at-identifier and the
rule content.
</p>
</descr>
</param>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
The index within the media block's rule collection of the rule
before which to insert the specified rule. If the
specified index is equal to the length of the media blocks's rule
collection, the rule will be added to the end of the media block.
</p>
</descr>
</param>
</parameters>
<returns type="unsigned long">
<descr>
<p>
The index within the media block's rule collection of the newly
inserted rule.
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted
at the specified index, e.g., if an <code>@import</code> rule
is inserted after a standard rule set or other at-rule.</p>
<p>INDEX_SIZE_ERR: Raised if the specified index is not a valid
insertion point.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is
readonly.</p>
<p>SYNTAX_ERR: Raised if the specified rule has a syntax error
and is unparsable.</p>
</descr>
</exception>
</raises>
</method>
<method name="deleteRule" id="CSS-CSSMediaRule-deleteRule">
<descr>
<p>
Used to delete a rule from the media block.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
The index within the media block's rule collection of the rule
to remove.
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
<exception name="DOMException">
<descr>
<p>INDEX_SIZE_ERR: Raised if the specified index does not correspond
to a rule in the media rule list.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is
readonly.</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSPageRule interface -->
<interface name="CSSPageRule" inherits="CSSRule" id="CSS-CSSPageRule"
since="DOM Level 2">
<descr>
<p>
The <code>CSSPageRule</code> interface represents a <xspecref
href="&css2;/page.html#page-box">@page
rule</xspecref> within a CSS style sheet. The <code>@page</code> rule is
used to specify the dimensions, orientation, margins, etc. of a page box
for paged media.
</p>
</descr>
<attribute type="DOMString" name="selectorText" id="CSS-CSSPageRule-name">
<descr>
<p>
The parsable textual representation of the page selector for the rule.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is
readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute type="CSSStyleDeclaration" readonly="yes" name="style" id="CSS-CSSPageRule-style">
<descr>
<p>
The <xspecref href="&css2;/syndata.html#q8">declaration-block</xspecref> of this rule.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,454 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSPrimitiveValue interface -->
<interface id="CSS-CSSPrimitiveValue" name="CSSPrimitiveValue"
inherits="CSSValue" since="DOM Level 2">
<descr>
<p>
The <code>CSSPrimitiveValue</code> interface represents a single
<xspecref href="&css2;/syndata.html#values">CSS value</xspecref>. This
interface may be used to determine the value of a specific style property
currently set in a block or to set a specific style property explicitly
within the block. An instance of this interface might be obtained from
the <code>getPropertyCSSValue</code> method of the
<code>CSSStyleDeclaration</code> interface. A
<code>CSSPrimitiveValue</code> object only occurs in a context of a CSS
property.
</p>
<p>
Conversions are allowed between absolute values (from millimeters to
centimeters, from degrees to radians, and so on) but not between relative
values. (For example, a pixel value cannot be converted to a centimeter
value.) Percentage values can't be converted since they are relative to
the parent value (or another property value). There is one exception for
color percentage values: since a color percentage value is relative to
the range 0-255, a color percentage value can be converted to a number;
(see also the <code>RGBColor</code> interface).
</p>
</descr>
<group id="CSS-CSSPrimitiveValue-types" name="UnitTypes">
<descr>
<p>An integer indicating which type of unit applies to the value.</p>
</descr>
<constant name="CSS_UNKNOWN" type="unsigned short" value="0">
<descr><p>The value is not a recognized CSS2 value. The value can only be
obtained by using the <code>cssText</code> attribute.</p></descr>
</constant>
<constant name="CSS_NUMBER" type="unsigned short" value="1">
<descr><p>The value is a simple <xspecref
href="&css2;/syndata.html#q13">number</xspecref>.
The value can be obtained by using the <code>getFloatValue</code> method.</p></descr>
</constant>
<constant name="CSS_PERCENTAGE" type="unsigned short" value="2">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#percentage-units">percentage</xspecref>.
The value can be obtained by using the <code>getFloatValue</code> method.</p></descr>
</constant>
<constant name="CSS_EMS" type="unsigned short" value="3">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(ems)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_EXS" type="unsigned short" value="4">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(exs)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_PX" type="unsigned short" value="5">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(px)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_CM" type="unsigned short" value="6">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(cm)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_MM" type="unsigned short" value="7">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(mm)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_IN" type="unsigned short" value="8">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(in)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_PT" type="unsigned short" value="9">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(pt)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_PC" type="unsigned short" value="10">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(pc)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_DEG" type="unsigned short" value="11">
<descr><p>The value is an <xspecref
href="&css2;/syndata.html#q19">angle
(deg)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_RAD" type="unsigned short" value="12">
<descr><p>The value is an <xspecref
href="&css2;/syndata.html#q19">angle
(rad)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_GRAD" type="unsigned short" value="13">
<descr><p>The value is an <xspecref
href="&css2;/syndata.html#q19">angle
(grad)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_MS" type="unsigned short" value="14">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#q20">time
(ms)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_S" type="unsigned short" value="15">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#q20">time (s)</xspecref>.
The value can be obtained by using the <code>getFloatValue</code> method.</p></descr>
</constant>
<constant name="CSS_HZ" type="unsigned short" value="16">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#q21">frequency
(Hz)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_KHZ" type="unsigned short" value="17">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#q21">frequency
(kHz)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_DIMENSION" type="unsigned short" value="18">
<descr><p>The value is a number with an unknown dimension.
The value can be obtained by using the <code>getFloatValue</code> method.</p></descr>
</constant>
<constant name="CSS_STRING" type="unsigned short" value="19">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#strings">STRING</xspecref>.
The value can be obtained by using the <code>getStringValue</code> method.</p></descr>
</constant>
<constant name="CSS_URI" type="unsigned short" value="20">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#uri">URI</xspecref>.
The value can be obtained by using the <code>getStringValue</code> method.</p></descr>
</constant>
<constant name="CSS_IDENT" type="unsigned short" value="21">
<descr><p>The value is an <xspecref
href="&css2;/syndata.html#value-def-identifier">identifier</xspecref>.
The value can be obtained by using the <code>getStringValue</code> method.</p></descr>
</constant>
<constant name="CSS_ATTR" type="unsigned short" value="22">
<descr><p>The value is a <xspecref
href="&css2;/generate.html#x16">attribute
function</xspecref>. The value can be obtained by using the <code>getStringValue</code>
method.</p></descr>
</constant>
<constant name="CSS_COUNTER" type="unsigned short" value="23">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#counter">counter or
counters function</xspecref>. The value can be obtained by using the
<code>getCounterValue</code> method.</p></descr>
</constant>
<constant name="CSS_RECT" type="unsigned short" value="24">
<descr><p>The value is a <xspecref
href="&css2;/visufx.html#value-def-shape">rect
function</xspecref>. The value can be obtained by using the <code>getRectValue</code>
method.</p></descr>
</constant>
<constant name="CSS_RGBCOLOR" type="unsigned short" value="25">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#color-units">RGB
color</xspecref>. The value can be obtained by using the <code>getRGBColorValue</code>
method.</p></descr>
</constant>
</group>
<attribute id="CSS-CSSPrimitiveValue-primitiveType"
name="primitiveType" type="unsigned short" readonly="yes">
<descr>
<p>The type of the value as defined by the constants specified above.</p>
</descr>
</attribute>
<method id="CSS-CSSPrimitiveValue-setFloatValue" name="setFloatValue">
<descr>
<p>
A method to set the float value with a specified unit. If the property
attached with this value can not accept the specified unit or the float
value, the value will be unchanged and a <code>DOMException</code> will
be raised.
</p>
</descr>
<parameters>
<param name="unitType" type="unsigned short" attr="in">
<descr>
<p>
A unit code as defined above. The unit code can only be a float
unit type (i.e. <code>CSS_NUMBER</code>,
<code>CSS_PERCENTAGE</code>, <code>CSS_EMS</code>,
<code>CSS_EXS</code>, <code>CSS_PX</code>, <code>CSS_CM</code>,
<code>CSS_MM</code>, <code>CSS_IN</code>, <code>CSS_PT</code>,
<code>CSS_PC</code>, <code>CSS_DEG</code>, <code>CSS_RAD</code>,
<code>CSS_GRAD</code>, <code>CSS_MS</code>, <code>CSS_S</code>,
<code>CSS_HZ</code>, <code>CSS_KHZ</code>,
<code>CSS_DIMENSION</code>).
</p>
</descr>
</param>
<param name="floatValue" type="float" attr="in">
<descr>
<p>
The new float value.
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the attached property doesn't support
the float value or the unit type.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
readonly.</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-getFloatValue" name="getFloatValue">
<descr>
<p>
This method is used to get a float value in a specified unit. If this
CSS value doesn't contain a float value or can't be converted into the
specified unit, a <code>DOMException</code> is raised.
</p>
</descr>
<parameters>
<param name="unitType" type="unsigned short" attr="in">
<descr>
<p>
A unit code to get the float value. The unit code can only be a
float unit type (i.e. <code>CSS_NUMBER</code>,
<code>CSS_PERCENTAGE</code>, <code>CSS_EMS</code>,
<code>CSS_EXS</code>, <code>CSS_PX</code>, <code>CSS_CM</code>,
<code>CSS_MM</code>, <code>CSS_IN</code>, <code>CSS_PT</code>,
<code>CSS_PC</code>, <code>CSS_DEG</code>, <code>CSS_RAD</code>,
<code>CSS_GRAD</code>, <code>CSS_MS</code>, <code>CSS_S</code>,
<code>CSS_HZ</code>, <code>CSS_KHZ</code>,
<code>CSS_DIMENSION</code>).
</p>
</descr>
</param>
</parameters>
<returns type="float">
<descr>
<p>
The float value in the specified unit.
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a float
value or if the float value can't be converted into the specified
unit.
</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-setStringValue" name="setStringValue">
<descr>
<p>
A method to set the string value with the specified unit. If the
property attached to this value can't accept the specified unit or the
string value, the value will be unchanged and a
<code>DOMException</code> will be raised.
</p>
</descr>
<parameters>
<param name="stringType" type="unsigned short" attr="in">
<descr>
<p>
A string code as defined above. The string code can only be a
string unit type (i.e. <code>CSS_STRING</code>,
<code>CSS_URI</code>, <code>CSS_IDENT</code>, and
<code>CSS_ATTR</code>).
</p>
</descr>
</param>
<param name="stringValue" type="DOMString" attr="in">
<descr>
<p>
The new string value.
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string
value or if the string value can't be converted into the specified
unit.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
readonly.</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-getStringValue" name="getStringValue">
<descr>
<p>
This method is used to get the string value. If the
CSS value doesn't contain a string value, a <code>DOMException</code>
is raised.
</p>
<note>
<p>
Some properties (like <loc
href="&css2;/fonts.html#propdef-font-family">'font-family'</loc> or
<loc
href="&css2;/aural.html#propdef-voice-family">'voice-family'</loc>)
convert a whitespace separated list of idents to a string.
</p>
</note>
</descr>
<parameters>
</parameters>
<returns type="DOMString">
<descr>
<p>
The string value in the current unit. The current
<code>primitiveType</code> can only be a string unit type
(i.e. <code>CSS_STRING</code>, <code>CSS_URI</code>,
<code>CSS_IDENT</code> and <code>CSS_ATTR</code>).
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string
value.
</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-getCounterValue" name="getCounterValue">
<descr>
<p>
This method is used to get the Counter value. If this CSS value doesn't
contain a counter value, a <code>DOMException</code> is
raised. Modification to the corresponding style property can be
achieved using the <code>Counter</code> interface.
</p>
</descr>
<parameters>
</parameters>
<returns type="Counter">
<descr>
<p>The Counter value.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a
Counter value (e.g. this is not <code>CSS_COUNTER</code>).
</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-getRectValue" name="getRectValue">
<descr>
<p>
This method is used to get the Rect value. If this CSS value doesn't
contain a rect value, a <code>DOMException</code> is
raised. Modification to the corresponding style property can be
achieved using the <code>Rect</code> interface.
</p>
</descr>
<parameters>
</parameters>
<returns type="Rect">
<descr>
<p>The Rect value.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Rect
value. (e.g. this is not <code>CSS_RECT</code>).
</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-getRGBColorValue" name="getRGBColorValue">
<descr>
<p>
This method is used to get the RGB color. If this CSS value doesn't
contain a RGB color value, a <code>DOMException</code> is
raised. Modification to the corresponding style property can be
achieved using the <code>RGBColor</code> interface.
</p>
</descr>
<parameters>
</parameters>
<returns type="RGBColor">
<descr>
<p>the RGB color value.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the attached property can't return a
RGB color value (e.g. this is not <code>CSS_RGBCOLOR</code>).
</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSRule interface -->
<interface name="CSSRule" id="CSS-CSSRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSRule</code> interface is the abstract base interface for any
type of CSS <xspecref
href="&css2;/syndata.html#q5">statement</xspecref>.
This includes both <xspecref
href="&css2;/syndata.html#q8">rule sets</xspecref>
and <xspecref
href="&css2;/syndata.html#at-rules">at-rules</xspecref>. An
implementation is expected to preserve all rules specified in a CSS style
sheet, even if the rule is not recognized by the parser. Unrecognized
rules are represented using the <code>CSSUnknownRule</code> interface.
</p>
</descr>
<group id="CSS-CSSRule-ruleType" name="RuleType">
<descr><p>An integer indicating which type of rule this is.</p></descr>
<constant name="UNKNOWN_RULE" type="unsigned short" value="0">
<descr><p>The rule is a <code>CSSUnknownRule</code>.</p></descr>
</constant>
<constant name="STYLE_RULE" type="unsigned short" value="1">
<descr><p>The rule is a <code>CSSStyleRule</code>.</p></descr>
</constant>
<constant name="CHARSET_RULE" type="unsigned short" value="2">
<descr><p>The rule is a <code>CSSCharsetRule</code>.</p></descr>
</constant>
<constant name="IMPORT_RULE" type="unsigned short" value="3">
<descr><p>The rule is a <code>CSSImportRule</code>.</p></descr>
</constant>
<constant name="MEDIA_RULE" type="unsigned short" value="4">
<descr><p>The rule is a <code>CSSMediaRule</code>.</p></descr>
</constant>
<constant name="FONT_FACE_RULE" type="unsigned short" value="5">
<descr><p>The rule is a <code>CSSFontFaceRule</code>.</p></descr>
</constant>
<constant name="PAGE_RULE" type="unsigned short" value="6">
<descr><p>The rule is a <code>CSSPageRule</code>.</p></descr>
</constant>
</group>
<attribute type="unsigned short" readonly="yes" name="type" id="CSS-CSSRule-type">
<descr>
<p>
The type of the rule, as defined above. The expectation is that
binding-specific casting methods can be used to cast down from an
instance of the <code>CSSRule</code> interface to the specific derived
interface implied by the <code>type</code>.
</p>
</descr>
</attribute>
<attribute type="DOMString" name="cssText" id="CSS-CSSRule-cssText">
<descr>
<p>
The parsable textual representation of the rule. This reflects the
current state of the rule and not its initial value.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.</p>
<p>INVALID_MODIFICATION_ERR: Raised if the specified CSS string value
represents a different type of rule than the current one.</p>
<p>HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at
this point in the style sheet.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if the rule is readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute type="CSSStyleSheet" readonly="yes" name="parentStyleSheet" id="CSS-CSSRule-sheet">
<descr>
<p>
The style sheet that contains this rule.
</p>
</descr>
</attribute>
<attribute type="CSSRule" readonly="yes" name="parentRule" id="CSS-CSSRule-parentRule">
<descr>
<p>
If this rule is contained inside another rule (e.g. a style rule inside
an @media block), this is the containing rule. If this rule is not
nested inside any other rules, this returns <code>null</code>.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSRuleList interface -->
<interface name="CSSRuleList" id="CSS-CSSRuleList"
since="DOM Level 2">
<descr>
<p>
The <code>CSSRuleList</code> interface provides the
abstraction of an ordered collection of CSS rules.
</p>
<p>
The items in the <code>CSSRuleList</code> are accessible via an integral
index, starting from 0.
</p>
</descr>
<attribute type="unsigned long" readonly="yes" name="length" id="CSS-CSSRuleList-length">
<descr>
<p>
The number of <code>CSSRules</code> in the list. The range of valid
child rule indices is <code>0</code> to <code>length-1</code> inclusive.
</p>
</descr>
</attribute>
<method name="item" id="CSS-CSSRuleList-item">
<descr>
<p>
Used to retrieve a CSS rule by ordinal index. The order in this
collection represents the order of the rules in the CSS style sheet. If
index is greater than or equal to the number of rules in the list, this
returns <code>null</code>.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr><p>Index into the collection</p></descr>
</param>
</parameters>
<returns type="CSSRule">
<descr><p>The style rule at the <code>index</code> position in the
<code>CSSRuleList</code>, or <code>null</code> if
that is not a valid index.
</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,293 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSStyleDeclaration interface -->
<interface name="CSSStyleDeclaration" id="CSS-CSSStyleDeclaration"
since="DOM Level 2">
<descr>
<p>
The <code>CSSStyleDeclaration</code> interface represents a single
<xspecref href="&css2;/syndata.html#block">CSS declaration block</xspecref>. This interface may be used to determine the style properties
currently set in a block or to set style properties explicitly within
the block.
</p>
<p>
While an implementation may not recognize all CSS properties within a CSS
declaration block, it is expected to provide access to all specified
properties in the style sheet through the
<code>CSSStyleDeclaration</code> interface. Furthermore, implementations
that support a specific level of CSS should correctly handle <xspecref
href="&css2;/about.html#shorthand">CSS shorthand</xspecref> properties
for that level. For a further discussion of shorthand properties, see the
<code>CSS2Properties</code> interface.
</p>
<p>
This interface is also used to provide a <b>read-only</b> access to the
<xspecref href="&css2;/cascade.html#computed-value">computed
values</xspecref> of an element. See also the <code>ViewCSS</code>
interface.
</p>
<note>
<p>
The CSS Object Model doesn't provide an access to the <xspecref
href="&css2;/cascade.html#specified-value">specified</xspecref> or
<xspecref
href="&css2;/cascade.html#specified-value">actual</xspecref> values of the
CSS cascade.
</p>
</note>
</descr>
<attribute type="DOMString" name="cssText" id="CSS-CSSStyleDeclaration-cssText">
<descr>
<p>
The parsable textual representation of the declaration block (excluding
the surrounding curly braces). Setting this attribute will result in
the parsing of the new value and resetting of all the properties in the
declaration block including the removal or addition of properties.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is
readonly or a property is readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
<method name="getPropertyValue" id="CSS-CSSStyleDeclaration-getPropertyValue">
<descr>
<p>
Used to retrieve the value of a CSS property if it has been explicitly
set within this declaration block.
</p>
</descr>
<parameters>
<param name="propertyName" type="DOMString" attr="in">
<descr>
<p>
The name of the CSS property. See the <xspecref href="&css2;/propidx.html">CSS property index</xspecref>.
</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr>
<p>
Returns the value of the property if it has been explicitly set
for this declaration block. Returns the empty string if the property
has not been set.
</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="getPropertyCSSValue" id="CSS-CSSStyleDeclaration-getPropertyCSSValue">
<descr>
<p>
Used to retrieve the object representation of the value of a CSS
property if it has been explicitly set within this declaration block.
This method returns <code>null</code> if the property is a <xspecref href="&css2;/about.html#shorthand">shorthand</xspecref> property. Shorthand
property values can only be accessed and modified as strings, using
the <code>getPropertyValue</code> and <code>setProperty</code> methods.
</p>
</descr>
<parameters>
<param name="propertyName" type="DOMString" attr="in">
<descr>
<p>
The name of the CSS property. See the <xspecref href="&css2;/propidx.html">CSS property index</xspecref>.
</p>
</descr>
</param>
</parameters>
<returns type="CSSValue">
<descr>
<p>
Returns the value of the property if it has been explicitly set for
this declaration block. Returns <code>null</code> if the property
has not been set.
</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="removeProperty" id="CSS-CSSStyleDeclaration-removeProperty">
<descr>
<p>
Used to remove a CSS property if it has been explicitly
set within this declaration block.
</p>
</descr>
<parameters>
<param name="propertyName" type="DOMString" attr="in">
<descr>
<p>
The name of the CSS property. See the <xspecref href="&css2;/propidx.html">CSS property index</xspecref>.
</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr>
<p>
Returns the value of the property if it has been explicitly set
for this declaration block. Returns the empty string if the property
has not been set or the property name does not correspond to
a known CSS property.
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is
readonly or the property is readonly.</p>
</descr>
</exception>
</raises>
</method>
<method name="getPropertyPriority" id="CSS-CSSStyleDeclaration-getPropertyPriority">
<descr>
<p>
Used to retrieve the priority of a CSS property
(e.g. the <code>"important"</code> qualifier) if the property
has been explicitly set in this declaration block.
</p>
</descr>
<parameters>
<param name="propertyName" type="DOMString" attr="in">
<descr>
<p>
The name of the CSS property. See the <xspecref
href="&css2;/propidx.html">CSS property
index</xspecref>.
</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr>
<p>
A string representing the priority (e.g. <code>"important"</code>)
if one exists. The empty string if none exists.
</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="setProperty" id="CSS-CSSStyleDeclaration-setProperty">
<descr>
<p>
Used to set a property value and priority within this declaration
block.
</p>
</descr>
<parameters>
<param name="propertyName" type="DOMString" attr="in">
<descr>
<p>
The name of the CSS property. See the <xspecref href="&css2;/propidx.html">CSS property index</xspecref>.
</p>
</descr>
</param>
<param name="value" type="DOMString" attr="in">
<descr>
<p>
The new value of the property.
</p>
</descr>
</param>
<param name="priority" type="DOMString" attr="in">
<descr>
<p>
The new priority of the property (e.g. <code>"important"</code>).
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr>
<p>
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified value has a syntax error
and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is
readonly or the property is readonly.</p>
</descr>
</exception>
</raises>
</method>
<attribute type="unsigned long" readonly="yes" name="length" id="CSS-CSSStyleDeclaration-length">
<descr>
<p>
The number of properties that have been explicitly set in this
declaration block. The range of valid indices is 0 to length-1
inclusive.
</p>
</descr>
</attribute>
<method name="item" id="CSS-CSSStyleDeclaration-item">
<descr>
<p>
Used to retrieve the properties that have been explicitly set in
this declaration block. The order of the properties retrieved using
this method does not have to be the order in which they were set.
This method can be used to iterate over all properties in this
declaration block.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
Index of the property name to retrieve.
</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr>
<p>
The name of the property at this ordinal position. The empty string
if no property exists at this position.
</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<attribute type="CSSRule" readonly="yes" name="parentRule" id="CSS-CSSStyleDeclaration-parentRule">
<descr>
<p>
The CSS rule that contains this declaration block or <code>null</code>
if this <code>CSSStyleDeclaration</code> is not attached to a
<code>CSSRule</code>.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSStyleRule interface -->
<interface name="CSSStyleRule" inherits="CSSRule"
id="CSS-CSSStyleRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSStyleRule</code> interface represents a single <xspecref
href="&css2;/syndata.html#q8">rule set</xspecref>
in a CSS style sheet.
</p>
</descr>
<attribute type="DOMString" name="selectorText" id="CSS-CSSStyleRule-selectorText">
<descr>
<p>
The textual representation of the <xspecref
href="&css2;/selector.html">selector</xspecref>
for the rule set. The implementation may have stripped out insignificant
whitespace while parsing the selector.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified CSS string value has a syntax error
and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is
readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute type="CSSStyleDeclaration" readonly="yes" name="style" id="CSS-CSSStyleRule-style">
<descr>
<p>
The <xspecref
href="&css2;/syndata.html#q8">declaration-block</xspecref>
of this rule set.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSStyleSheet interface -->
<interface name="CSSStyleSheet" inherits="stylesheets::StyleSheet"
id="CSS-CSSStyleSheet" since="DOM Level 2">
<descr>
<p>
The <code>CSSStyleSheet</code> interface is a concrete interface used
to represent a CSS style sheet i.e., a style sheet whose content type
is "text/css".
</p>
</descr>
<attribute type="CSSRule" readonly="yes" name="ownerRule" id="CSS-CSSStyleSheet-ownerRule">
<descr>
<p>
If this style sheet comes from an <code>@import</code> rule, the
<code>ownerRule</code> attribute will contain the
<code>CSSImportRule</code>. In that case, the <code>ownerNode</code>
attribute in the <code>StyleSheet</code> interface will be
<code>null</code>. If the style sheet comes from an element or a
processing instruction, the <code>ownerRule</code> attribute will be
<code>null</code> and the <code>ownerNode</code> attribute will contain
the <code>Node</code>.
</p>
</descr>
</attribute>
<attribute type="CSSRuleList" readonly="yes" name="cssRules" id="CSS-CSSStyleSheet-cssRules">
<descr>
<p>
The list of all CSS rules contained within the style sheet.
This includes both <xspecref href="&css2;/syndata.html#q8">rule sets</xspecref> and
<xspecref href="&css2;/syndata.html#at-rules">at-rules</xspecref>.
</p>
</descr>
</attribute>
<method name="insertRule" id="CSS-CSSStyleSheet-insertRule">
<descr>
<p>
Used to insert a new rule into the style sheet. The new rule now
becomes part of the cascade.
</p>
</descr>
<parameters>
<param name="rule" type="DOMString" attr="in">
<descr>
<p>
The parsable text representing the rule. For rule sets
this contains both the selector and the style declaration.
For at-rules, this specifies both the at-identifier and the
rule content.
</p>
</descr>
</param>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
The index within the style sheet's rule list of the rule
before which to insert the specified rule. If the
specified index is equal to the length of the style sheet's rule
collection, the rule will be added to the end of the style sheet.
</p>
</descr>
</param>
</parameters>
<returns type="unsigned long">
<descr>
<p>
The index within the style sheet's rule collection of the newly
inserted rule.
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted
at the specified index e.g. if an <code>@import</code> rule
is inserted after a standard rule set or other at-rule.</p>
<p>INDEX_SIZE_ERR: Raised if the specified index is not a valid
insertion point.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is
readonly.</p>
<p>SYNTAX_ERR: Raised if the specified rule has a syntax error
and is unparsable.</p>
</descr>
</exception>
</raises>
</method>
<method name="deleteRule" id="CSS-CSSStyleSheet-deleteRule">
<descr>
<p>
Used to delete a rule from the style sheet.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
The index within the style sheet's rule list of the rule
to remove.
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>INDEX_SIZE_ERR: Raised if the specified index does not correspond
to a rule in the style sheet's rule list.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is
readonly.</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSUnknownRule interface -->
<interface name="CSSUnknownRule" inherits="CSSRule"
id="CSS-CSSUnknownRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSUnknownRule</code> interface represents an at-rule not
supported by this user agent.
</p>
</descr>
</interface>
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSValue interface -->
<interface name="CSSValue" id="CSS-CSSValue" since="DOM Level 2">
<descr>
<p>
The <code>CSSValue</code> interface represents a simple or a complex
value. A <code>CSSValue</code> object only occurs in a context of a CSS
property.
</p>
</descr>
<group id="CSS-CSSValue-types" name="UnitTypes">
<descr>
<p>An integer indicating which type of unit applies to the value.</p>
</descr>
<constant name="CSS_INHERIT" type="unsigned short" value="0">
<descr><p>The value is inherited and the <code>cssText</code> contains
"inherit".</p>
</descr>
</constant>
<constant name="CSS_PRIMITIVE_VALUE" type="unsigned short" value="1">
<descr>
<p>The value is a primitive value and an instance of the
<code>CSSPrimitiveValue</code> interface can be obtained by using
binding-specific casting methods on this instance of the
<code>CSSValue</code> interface.</p>
</descr>
</constant>
<constant name="CSS_VALUE_LIST" type="unsigned short" value="2">
<descr><p>The value is a <code>CSSValue</code> list and an instance of
the <code>CSSValueList</code> interface can be obtained by using
binding-specific casting methods on this instance of the
<code>CSSValue</code> interface.</p>
</descr>
</constant>
<constant name="CSS_CUSTOM" type="unsigned short" value="3">
<descr><p>The value is a custom value.</p>
</descr>
</constant>
</group>
<attribute id="CSS-CSSValue-cssText" name="cssText" type="DOMString" readonly="no">
<descr>
<p>
A string representation of the current value.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>
SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error (according to the attached property) or is unparsable.
</p>
<p>INVALID_MODIFICATION_ERR: Raised if the specified CSS string value
represents a different type of values than the values allowed by
the CSS property.</p>
<p>
NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly.
</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute id="CSS-CSSValue-cssValueType" name="cssValueType" type="unsigned short" readonly="yes">
<descr>
<p>
A code defining the type of the value as defined above.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- the CSSValueList interface -->
<interface id="CSS-CSSValueList" name="CSSValueList"
inherits="CSSValue" since="DOM Level 2">
<descr>
<p>The <code>CSSValueList</code> interface provides the abstraction of an
ordered collection of CSS values.</p>
<p>
Some properties allow an empty list into their syntax. In that case,
these properties take the <code>none</code> identifier. So, an empty list
means that the property has the value <code>none</code>.
</p>
<p>
The items in the <code>CSSValueList</code> are accessible via an integral
index, starting from 0.
</p>
</descr>
<attribute id="CSS-CSSValueList-length" name="length"
type="unsigned long" readonly="yes">
<descr>
<p>The number of <code>CSSValues</code> in the list. The range of valid
values of the indices is <code>0</code> to <code>length-1</code>
inclusive.</p>
</descr>
</attribute>
<method id="CSS-CSSValueList-item" name="item">
<descr>
<p>Used to retrieve a <code>CSSValue</code> by ordinal index. The order in this
collection represents the order of the values in the CSS style
property. If index is greater than or equal to the number of values in the list, this
returns <code>null</code>.</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>Index into the collection.</p>
</descr>
</param>
</parameters>
<returns type="CSSValue">
<descr>
<p>The <code>CSSValue</code> at the <code>index</code> position in the
<code>CSSValueList</code>, or <code>null</code> if that is not a valid
index.</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Counter interface -->
<interface id="CSS-Counter" name="Counter" since="DOM Level 2">
<descr>
<p>
The <code>Counter</code> interface is used to represent any <xspecref href="&css2;/syndata.html#value-def-counter">counter or
counters function</xspecref> value. This interface reflects the values in
the underlying style property.
</p>
</descr>
<attribute id="CSS-Counter-identifier" name="identifier" type="DOMString" readonly="yes">
<descr>
<p>
This attribute is used for the identifier of the counter.
</p>
</descr>
</attribute>
<attribute id="CSS-Counter-listStyle" name="listStyle" type="DOMString" readonly="yes">
<descr>
<p>
This attribute is used for the style of the list.
</p>
</descr>
</attribute>
<attribute id="CSS-Counter-separator" name="separator" type="DOMString" readonly="yes">
<descr>
<p>
This attribute is used for the separator of the nested counters.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<interface id="CSS-DOMImplementationCSS" name="DOMImplementationCSS" since="DOM
Level 2" inherits="DOMImplementation">
<descr>
<p>
This interface allows the DOM user to create a <code>CSSStyleSheet</code>
outside the context of a document. There is no way to associate the new
<code>CSSStyleSheet</code> with a document in DOM Level 2.
</p>
</descr>
<method id='CSS-DOMImplementationCSS-createCSSStyleSheet' name="createCSSStyleSheet">
<descr>
<p>Creates a new <code>CSSStyleSheet</code>.</p>
</descr>
<parameters>
<param name="title" type="DOMString" attr="in">
<descr>
<p>
The advisory title. See also the <specref
ref="StyleSheets-StyleSheet-title"/> section.
</p>
</descr>
</param>
<param name="media" type="DOMString" attr="in">
<descr>
<p>
The comma-separated list of media associated with the new style
sheet. See also the <specref ref="StyleSheets-StyleSheet-media"/>
section.
</p>
</descr>
</param>
</parameters>
<returns type="CSSStyleSheet">
<descr>
<p>A new CSS style sheet.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
SYNTAX_ERR: Raised if the specified media string value has a syntax
error and is unparsable.
</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- DocumentCSS interface -->
<interface id="CSS-DocumentCSS" name="DocumentCSS"
inherits="stylesheets::DocumentStyle" since="DOM Level 2">
<descr>
<p>This interface represents a document with a CSS view.</p>
<p>
The <code>getOverrideStyle</code> method provides a mechanism through
which a DOM author could effect immediate change to the style of an
element without modifying the explicitly linked style sheets of a
document or the inline style of elements in the style sheets. This style
sheet comes after the author style sheet in the cascade algorithm and is
called <emph>override style sheet</emph>. The override style sheet takes
precedence over author style sheets. An "!important" declaration still
takes precedence over a normal declaration. Override, author, and user
style sheets all may contain "!important" declarations. User "!important"
rules take precedence over both override and author "!important" rules,
and override "!important" rules take precedence over author "!important"
rules.
</p>
<p>
The expectation is that an instance of the <code>DocumentCSS</code>
interface can be obtained by using binding-specific casting methods on an
instance of the <code>Document</code> interface.
</p>
</descr>
<method id="CSS-DocumentCSS-getOverrideStyle" name="getOverrideStyle">
<descr>
<p>
This method is used to retrieve the override style declaration for a
specified element and a specified pseudo-element.
</p>
</descr>
<parameters>
<param name="elt" type="Element" attr="in">
<descr>
<p>
The element whose style is to be modified. This parameter cannot
be null.
</p>
</descr>
</param>
<param name="pseudoElt" type="DOMString" attr="in">
<descr>
<p>
The pseudo-element or <code>null</code> if none.
</p>
</descr>
</param>
</parameters>
<returns type="CSSStyleDeclaration">
<descr>
<p>
The override style declaration.
</p>
</descr>
</returns>
<raises>
</raises>
</method>
</interface>
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- DocumentStyle interface -->
<interface name="DocumentStyle" id="StyleSheets-StyleSheet-DocumentStyle"
since="DOM Level 2">
<descr>
<p>
The <code>DocumentStyle</code> interface provides a mechanism by which
the style sheets embedded in a document can be retrieved. The expectation
is that an instance of the <code>DocumentStyle</code> interface can be
obtained by using binding-specific casting methods on an instance of the
<code>Document</code> interface.
</p>
</descr>
<attribute type="StyleSheetList" readonly="yes" name="styleSheets" id="StyleSheets-DocumentStyle-styleSheets">
<descr>
<p>
A list containing all the style sheets explicitly linked into or
embedded in a document. For HTML documents, this includes external
style sheets, included via the HTML
<xspecref href="&html40;/struct/links.html#h-12.3">
LINK</xspecref> element, and inline
<xspecref href="&html40;/present/styles.html#h-14.2.3">
STYLE</xspecref> elements. In XML, this includes external
style sheets, included via style sheet
processing instructions (see <bibref ref="XML-StyleSheet"/>).
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Counter interface -->
<interface id="CSS-ElementCSSInlineStyle" name="ElementCSSInlineStyle"
since="DOM Level 2">
<descr>
<p>
Inline style information attached to elements is exposed through the
<code>style</code> attribute. This represents the contents of the
<xspecref href="&html40;/present/styles.html#h-14.2.2">STYLE</xspecref>
attribute for HTML elements (or elements in other schemas or DTDs which
use the STYLE attribute in the same way). The expectation is that an
instance of the ElementCSSInlineStyle interface can be obtained by using
binding-specific casting methods on an instance of the Element interface
when the element supports inline CSS style informations.
</p>
</descr>
<attribute id="CSS-ElementCSSInlineStyle-style" name="style"
type="CSSStyleDeclaration" readonly="yes">
<descr>
<p>
The style attribute.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<interface id="StyleSheets-LinkStyle" name="LinkStyle" since="DOM Level 2">
<descr>
<p>
The <code>LinkStyle</code> interface provides a mechanism by which a
style sheet can be retrieved from the node responsible for linking it
into a document. An instance of the <code>LinkStyle</code> interface can
be obtained using binding-specific casting methods on an instance of a
linking node (<code>HTMLLinkElement</code>, <code>HTMLStyleElement</code>
or <code>ProcessingInstruction</code> in DOM Level 2).
</p>
</descr>
<attribute id="StyleSheets-LinkStyle-sheet" name="sheet"
type="StyleSheet" readonly="yes">
<descr>
<p>
The style sheet.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<interface id="StyleSheets-MediaList" name="MediaList" since="DOM Level 2">
<descr>
<p>
The <code>MediaList</code> interface provides the abstraction of an
ordered collection of <xspecref
href="&html40;/types.html#h-6.13">media</xspecref>,
without defining or constraining how this collection is implemented. An
empty list is the same as a list that contains the medium
<code>"all"</code>.
</p>
<p>
The items in the <code>MediaList</code> are accessible via an integral
index, starting from 0.
</p>
</descr>
<attribute type="DOMString" name="mediaText" id="StyleSheets-MediaList-mediaText">
<descr>
<p>
The parsable textual representation of the media list. This is a
comma-separated list of media.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified string value has a syntax
error and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is
readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute id="StyleSheets-MediaList-length" name="length" type="unsigned long" readonly="yes">
<descr>
<p>
The number of media in the list. The range of valid media is
<code>0</code> to <code>length-1</code> inclusive.
</p>
</descr>
</attribute>
<method id="StyleSheets-MediaList-item" name="item">
<descr>
<p>
Returns the <code>index</code>th in the list. If <code>index</code> is
greater than or equal to the number of media in the list, this returns
<code>null</code>.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
Index into the collection.
</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr>
<p>
The medium at the <code>index</code>th position in the
<code>MediaList</code>, or <code>null</code> if that is not a
valid index.
</p>
</descr>
</returns>
<raises>
</raises>
</method>
<method name="deleteMedium" id="StyleSheets-MediaList-deleteMedium">
<descr>
<p>
Deletes the medium indicated by <code>oldMedium</code> from the list.
</p>
</descr>
<parameters>
<param name="oldMedium" type="DOMString" attr="in">
<descr>
<p>The medium to delete in the media list.</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr>
<p></p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
</p>
<p>
NOT_FOUND_ERR: Raised if <code>oldMedium</code> is not in the list.
</p>
</descr>
</exception>
</raises>
</method>
<method id="StyleSheets-MediaList-appendMedium" name="appendMedium">
<descr>
<p>
Adds the medium <code>newMedium</code> to the end of the list. If the
<code>newMedium</code> is already used, it is first removed.
</p>
</descr>
<parameters>
<param name="newMedium" type="DOMString" attr="in">
<descr>
<p>The new medium to add.</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr>
<p></p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_CHARACTER_ERR: If the medium contains characters that are
invalid in the underlying style language.
</p>
<p>
NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- RGBColor interface -->
<interface id="CSS-RGBColor" name="RGBColor" since="DOM Level 2">
<descr>
<p>
The <code>RGBColor</code> interface is used to represent any <xspecref
href="&css2;/syndata.html#value-def-color">RGB
color</xspecref> value. This interface reflects the values in the
underlying style property. Hence, modifications made to the
<code>CSSPrimitiveValue</code> objects modify the style property.
</p>
<p>
A specified RGB color is not clipped (even if the number is outside the
range 0-255 or 0%-100%). A computed RGB color is clipped depending on the
device.
</p>
<p>
Even if a style sheet can only contain an integer for a color value, the
internal storage of this integer is a float, and this can be used as a
float in the specified or the computed style.
</p>
<p>
A color percentage value can always be converted to a number and vice
versa.
</p>
</descr>
<attribute id="CSS-RGBColor-red" name="red" type="CSSPrimitiveValue" readonly="yes">
<descr>
<p>
This attribute is used for the red value of the RGB color.
</p>
</descr>
</attribute>
<attribute id="CSS-RGBColor-green" name="green" type="CSSPrimitiveValue" readonly="yes">
<descr>
<p>
This attribute is used for the green value of the RGB color.
</p>
</descr>
</attribute>
<attribute id="CSS-RGBColor-blue" name="blue" type="CSSPrimitiveValue" readonly="yes">
<descr>
<p>
This attribute is used for the blue value of the RGB color.
</p>
</descr>
</attribute>
</interface>
+51
View File
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Rect interface -->
<interface id="CSS-Rect" name="Rect" since="DOM Level 2">
<descr>
<p>
The <code>Rect</code> interface is used to represent any <xspecref
href="&css2;/visufx.html#value-def-shape">rect</xspecref>
value. This interface reflects the values in the underlying style
property. Hence, modifications made to the <code>CSSPrimitiveValue</code>
objects modify the style property.
</p>
</descr>
<attribute id="CSS-Rect-top" name="top" type="CSSPrimitiveValue"
readonly="yes">
<descr>
<p>
This attribute is used for the top of the rect.
</p>
</descr>
</attribute>
<attribute id="CSS-Rect-right" name="right" type="CSSPrimitiveValue"
readonly="yes">
<descr>
<p>
This attribute is used for the right of the rect.
</p>
</descr>
</attribute>
<attribute id="CSS-Rect-bottom" name="bottom" type="CSSPrimitiveValue"
readonly="yes">
<descr>
<p>
This attribute is used for the bottom of the rect.
</p>
</descr>
</attribute>
<attribute id="CSS-Rect-left" name="left" type="CSSPrimitiveValue"
readonly="yes">
<descr>
<p>
This attribute is used for the left of the rect.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- StyleSheet interface -->
<interface name="StyleSheet" id="StyleSheets-StyleSheet" since="DOM Level 2">
<descr>
<p>
The <code>StyleSheet</code> interface is the abstract base interface for
any type of style sheet. It represents a single style sheet associated
with a structured document. In HTML, the StyleSheet interface represents
either an external style sheet, included via the HTML
<xspecref href="&html40;/struct/links.html#h-12.3">
LINK</xspecref> element, or an inline
<xspecref href="&html40;/present/styles.html#h-14.2.3">
STYLE</xspecref> element. In XML, this interface represents an external
style sheet, included via a <xspecref href="&xml-stylesheet;">style sheet
processing instruction</xspecref>.
</p>
</descr>
<attribute type="DOMString" readonly="yes" name="type" id="StyleSheets-StyleSheet-type">
<descr>
<p>
This specifies the style sheet language for this style sheet. The style
sheet language is specified as a content type (e.g. "text/css"). The
<xspecref href="&html40;/types.html#type-content-type">content
type</xspecref> is often specified in the <code>ownerNode</code>. Also
see the <xspecref href="&html40;/struct/links.html#adef-type-A">type
attribute definition</xspecref> for the <code>LINK</code> element in
HTML 4.0, and the type pseudo-attribute for the XML <xspecref
href="&xml-stylesheet;">style sheet processing instruction</xspecref>.
</p>
</descr>
</attribute>
<attribute type="boolean" name="disabled" id="StyleSheets-StyleSheet-disabled">
<descr>
<p>
<code>false</code> if the style sheet is applied to the document.
<code>true</code> if it is not. Modifying this attribute may cause a
new resolution of style for the document. A stylesheet only applies if
both an appropriate medium definition is present and the disabled
attribute is false. So, if the media doesn't apply to the current user
agent, the <code>disabled</code> attribute is ignored.
</p>
</descr>
</attribute>
<attribute type="Node" readonly="yes" name="ownerNode" id="StyleSheets-StyleSheet-ownerNode">
<descr>
<p>
The node that associates this style sheet with the document. For HTML,
this may be the corresponding <code>LINK</code> or <code>STYLE</code>
element. For XML, it may be the linking processing instruction. For
style sheets that are included by other style sheets, the value of this
attribute is <code>null</code>.
</p>
</descr>
</attribute>
<attribute type="StyleSheet" readonly="yes" name="parentStyleSheet" id="StyleSheets-StyleSheet-parentStyleSheet">
<descr>
<p>
For style sheet languages that support the concept of style sheet
inclusion, this attribute represents the including style sheet, if one
exists. If the style sheet is a top-level style sheet, or the style
sheet language does not support inclusion, the value of this attribute
is <code>null</code>.
</p>
</descr>
</attribute>
<attribute type="DOMString" readonly="yes" name="href" id="StyleSheets-StyleSheet-href">
<descr>
<p>
If the style sheet is a linked style sheet, the value of its attribute
is its location. For inline style sheets, the value of this attribute
is <code>null</code>. See the <xspecref
href="&html40;/struct/links.html#adef-href">href
attribute definition</xspecref> for the <code>LINK</code> element in HTML
4.0, and the href pseudo-attribute for the XML <xspecref
href="&xml-stylesheet;/#The xml-stylesheet processing instruction">style sheet processing
instruction</xspecref>.
</p>
</descr>
</attribute>
<attribute type="DOMString" readonly="yes" name="title" id="StyleSheets-StyleSheet-title">
<descr>
<p>
The advisory title. The title is often specified in the
<code>ownerNode</code>. See the <xspecref
href="&html40;/struct/global.html#adef-title">title attribute
definition</xspecref> for the <code>LINK</code> element in HTML 4.0,
and the title pseudo-attribute for the XML <xspecref
href="&xml-stylesheet;/#The xml-stylesheet processing instruction">style sheet processing instruction</xspecref>.
</p>
</descr>
</attribute>
<attribute type="MediaList" readonly="yes" name="media" id="StyleSheets-StyleSheet-media">
<descr>
<p>
The intended destination media for style information. The media is
often specified in the <code>ownerNode</code>. If no media has been
specified, the <code>MediaList</code> will be empty. See the <xspecref
href="&html40;/present/styles.html#adef-media">media
attribute definition</xspecref> for the <code>LINK</code> element in
HTML 4.0, and the media pseudo-attribute for the XML <xspecref
href="&xml-stylesheet;/#The xml-stylesheet processing instruction">style sheet processing
instruction </xspecref>. Modifying the media list may cause a change to
the attribute <code>disabled</code>.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- StyleSheetList interface -->
<interface name="StyleSheetList" id="StyleSheets-StyleSheetList"
since="DOM Level 2">
<descr>
<p>The <code>StyleSheetList</code> interface provides the
abstraction of an ordered collection of style sheets.
</p>
<p>
The items in the <code>StyleSheetList</code> are accessible via an
integral index, starting from 0.
</p>
</descr>
<attribute type="unsigned long" readonly="yes" name="length" id="StyleSheets-StyleSheetList-length">
<descr>
<p>
The number of <code>StyleSheets</code> in the list. The range of valid
child stylesheet indices is <code>0</code> to <code>length-1</code>
inclusive.
</p>
</descr>
</attribute>
<method name="item" id="StyleSheets-StyleSheetList-item">
<descr>
<p>
Used to retrieve a style sheet by ordinal index. If index is greater
than or equal to the number of style sheets in the list, this returns
<code>null</code>.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr><p>Index into the collection</p></descr>
</param>
</parameters>
<returns type="StyleSheet">
<descr><p>The style sheet at the <code>index</code> position in the
<code>StyleSheetList</code>, or <code>null</code> if
that is not a valid index.
</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- ViewCSS interface -->
<interface id="CSS-ViewCSS" name="ViewCSS" inherits="views::AbstractView" since="DOM Level 2">
<descr>
<p>
This interface represents a CSS view. The <code>getComputedStyle</code>
method provides a <b>read only access</b> to the <xspecref
href="&css2;/cascade.html#computed-value">computed values</xspecref> of
an element.
</p>
<p>
The expectation is that an instance of the <code>ViewCSS</code>
interface can be obtained by using binding-specific casting methods on an
instance of the <code>AbstractView</code> interface.
</p>
<p>
Since a computed style is related to an <code>Element</code> node, if
this element is removed from the document, the associated
<code>CSSStyleDeclaration</code> and <code>CSSValue</code> related to
this declaration are no longer valid.
</p>
</descr>
<method id="CSS-CSSview-getComputedStyle" name="getComputedStyle">
<descr>
<p>
This method is used to get the computed style as it is defined in
<bibref ref="CSS2"/>.
</p>
</descr>
<parameters>
<param name="elt" type="Element" attr="in">
<descr>
<p>
The element whose style is to be computed. This parameter cannot
be null.
</p>
</descr>
</param>
<param name="pseudoElt" type="DOMString" attr="in">
<descr>
<p>
The pseudo-element or <code>null</code> if none.
</p>
</descr>
</param>
</parameters>
<returns type="CSSStyleDeclaration">
<descr>
<p>
The computed style. The <code>CSSStyleDeclaration</code> is
read-only and contains only absolute values.
</p>
</descr>
</returns>
<raises>
<!-- No Exception -->
</raises>
</method>
</interface>
+195
View File
@@ -0,0 +1,195 @@
<?xml version="1.0" ?>
<!-- $Id$ -->
<!DOCTYPE spec PUBLIC
"-//W3C//DTD Specification V2.1-Based DOM//EN"
"../../../pubtext/xmlspec-v21-dom.dtd" [
<!ENTITY prefix "Style">
<!ENTITY % version SYSTEM "../version.xml">
%version;
<!ENTITY % links SYSTEM "../link-entities.xml">
%links;
<!ENTITY % parts SYSTEM "../part-entities.xml">
%parts;
<!ENTITY options SYSTEM "../options.xml">
]>
<spec>
<!--
*************************************************************************
* FRONT MATTER *
*************************************************************************
-->
&options;
<header>
<title>Document Object Model (DOM) Level 2 Style Specification</title>
<version>1.0</version> <w3c-designation>&doc.prefix;-&doc.date;
</w3c-designation> <w3c-doctype>W3C Recommendation</w3c-doctype> <pubdate>
<day>&date.day;</day> <month>&date.month;</month> <year>&date.year;</year>
</pubdate>
<publoc> <loc href="&this.url;">&this.url;</loc>
&ps.loc;
&pdf.loc;
&txt.loc;
&zip.loc;
</publoc>
<latestloc> <loc href="&latest.url;">&latest.url;</loc> </latestloc>
<prevlocs>
&prev.locs;
</prevlocs>
<authlist>
<author role="editor"> <name>Chris Wilson</name>
<affiliation>Microsoft Corp.</affiliation> </author>
<author role="editor"> <name>Philippe Le H&eacute;garet</name>
<affiliation>W3C, team contact (from November 1999)</affiliation> </author>
<author role="editor"> <name>Vidur Apparao</name>
<affiliation>Netscape Communications Corp.</affiliation> </author>
</authlist>
<!--
******************************************************
* DOCUMENT ABSTRACT *
******************************************************
-->
<abstract id="id-abstract">
<p>This specification defines the Document Object Model Level 2 Style Sheets
and Cascading Style Sheets (CSS), a platform- and language-neutral interface
that allows programs and scripts to dynamically access and update the content
and of style sheets documents. The Document Object Model Level 2 Style
builds on the Document Object Model Level 2 Core <bibref ref='DOMCore'/> and on
the Document Object Model Level 2 Views <bibref ref='DOMViews'/>.</p>
</abstract>
&status;
<sourcedesc>
<p>Created in electronic form.</p>
</sourcedesc>
<langusage>
<language id="en">English</language>
</langusage>
<revisiondesc>
<p>$Revision$</p>
</revisiondesc>
<?GENERATE-TOC?>
</header>
<front>
&toc;
&copyright;
</front>
<body>
&stylesheets;
&css;
</body>
<!--
*************************************************************************
* BACK MATTER *
*************************************************************************
-->
<back>
<div1 role="idl" id="idl">
<head>IDL Definitions</head>
<p>This appendix contains the complete OMG IDL <bibref ref='OMGIDL'/> for the
Level 2 Document Object Model Style definitions. The
definitions are divided into <loc href="#StyleSheets-IDL">Stylesheets</loc>
and <loc href="#CSS-IDL">CSS</loc>.</p>
<p>The IDL files are also available as: <loc
href="idl.zip">&this.url;/idl.zip</loc></p>
<div2 id="StyleSheets-IDL">
<head>Document Object Model Style Sheets</head>
<!--
******************************************************
| STYLESHEETS OMG IDL DEFINITIONS |
******************************************************
-->
<?GENERATE-IDL StyleSheets stylesheets dom.w3c.org dom?>
</div2>
<div2 id="CSS-IDL">
<head>Document Object Model CSS</head>
<!--
******************************************************
| CSS OMG IDL DEFINITIONS |
******************************************************
-->
<?GENERATE-IDL CSS css dom.w3c.org dom stylesheets views?>
</div2>
</div1>
<div1 role="java-binding" id="java-binding">
<head>Java Language Binding</head>
<p>This appendix contains the complete Java Language <bibref ref='Java'/>
binding for the Level 2 Document Object Model Style. The definitions are
divided into <loc href="#StyleSheets-Java">StyleSheets</loc> and <loc
href="#CSS-Java">CSS</loc>.</p>
<p>The Java files are also available as <loc
href="java-binding.zip">&this.url;/java-binding.zip</loc></p>
<div2 id="StyleSheets-Java">
<head>Document Object Model Style Sheets</head>
<!--
******************************************************
| STYLESHEETS JAVA BINDINGS |
******************************************************
-->
<?GENERATE-JAVA StyleSheets org.w3c.dom stylesheets?>
</div2>
<div2 id="CSS-Java">
<head>Document Object Model CSS</head>
<!--
******************************************************
| CSS JAVA BINDINGS |
******************************************************
-->
<?GENERATE-JAVA CSS org.w3c.dom css?>
</div2>
</div1>
<div1 role="ecma-binding" id="ecma-binding">
<head>ECMAScript Language Binding</head>
<p>This appendix contains the complete ECMAScript <bibref
ref='ECMAScript'/> binding for the Level 2 Document Object Model Style
definitions. The definitions are divided into
<loc href="#StyleSheets-ECMA">StyleSheets</loc> and
<loc href="#CSS-ECMA">CSS</loc>.</p>
<note>
<p>
Exceptions handling is only supported by ECMAScript implementation
conformant with the Standard ECMA-262 3rd. Edition (<bibref
ref="ECMAScript"/>).
</p>
</note>
<div2 id="StyleSheets-ECMA">
<head>Document Object Model StyleSheets</head>
<!--
******************************************************
| STYLESHEETS ECMASCRIPT BINDINGS |
******************************************************
-->
<?GENERATE-ECMA StyleSheets?>
</div2>
<div2 id="CSS-ECMA">
<head>Document Object Model CSS</head>
<!--
******************************************************
| CSS ECMASCRIPT BINDINGS |
******************************************************
-->
<?GENERATE-ECMA CSS?>
</div2>
</div1>
&contributors;
&references;
&index;
</back>
</spec>
+150
View File
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--
*************************************************************************
* BEGINNING OF LEVEL TWO STYLE SHEETS *
*************************************************************************
-->
<div1 id="StyleSheets">
<head>Document Object Model Style Sheets</head>
<orglist role="editors">
<member>
<name>Chris Wilson</name>
<affiliation>Microsoft Corp.</affiliation>
</member>
<member>
<name>Philippe Le H&eacute;garet</name>
<affiliation>W3C</affiliation>
</member>
<member>
<name>Vidur Apparao</name>
<affiliation>Netscape Communications Corp.</affiliation>
</member>
</orglist>
<?GENERATE-MINI-TOC?>
<!--
******************************************************
| INTRODUCTION |
******************************************************
-->
<div2 id="StyleSheets-overview">
<head>Introduction</head>
<p>
The DOM Level 2 Style Sheet interfaces are base interfaces used to
represent any type of style sheet. The expectation is that DOM modules
that represent a specific style sheet language may contain interfaces
that derive from these interfaces.
</p>
<p>
The interfaces found within this section are not mandatory. A DOM
application may use the <code>hasFeature(feature, version)</code> method
of the <code>DOMImplementation</code> interface with parameter values
"StyleSheets" and "2.0" (respectively) to determine whether or not this module
is supported by the implementation. In order to fully support this
module, an implementation must also support the "Core" feature defined
defined in the DOM 2 Core specification <bibref
ref="DOMCore"/>. Please refer to additional information about <xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
</div2>
<div2 id="StyleSheets-fundamental">
<head>Style Sheet Interfaces</head>
<p>This set of interfaces represents the generic notion of style sheets.</p>
<definitions>
&stylesheets-stylesheet;
&stylesheets-stylesheetlist;
&stylesheets-medialist;
</definitions>
</div2>
<div2 id="StyleSheets-extensions">
<head>Document Extensions</head>
<definitions>
&stylesheets-linkstyle;
&stylesheets-documentstyle;
</definitions>
</div2>
<div2 id="StyleSheets-Association">
<head>Association between a style sheet and a document.</head>
<glist>
<gitem>
<label>HTML and Style Sheet Creation</label>
<def>
<p>
A style sheet can be associated with an HTMLDocument in one of two
ways:
</p>
<ulist>
<item>
<p>
By creating a new LINK HTML element (see the
<code>HTMLLinkElement</code> interface in the <bibref
ref="DOMHTML-inf"/> and <bibref ref="HTML40"/>). The underlying
style sheet will be created after the element is inserted into
the document and both the href and the type attribute have been
set in a way indicating that the linked object is a style
sheet.
</p>
</item>
<item>
<p>
By creating a new STYLE HTML element (see the
<code>HTMLStyleElement</code> interface in the <bibref
ref="DOMHTML-inf"/> and <bibref ref="HTML40"/>). The underlying style
sheet will be created after the element is inserted into the
document and the type attribute is set in a way indicating that
the element corresponds to a style sheet language interpreted
by the user agent.
</p>
</item>
</ulist>
</def>
</gitem>
<gitem>
<label>
HTML and Style Sheet Removal
</label>
<def>
<p>
Removing a LINK HTML element or a STYLE HTML element removes the
underlying style sheet from the style sheet collection associated
with a document. Specifically, the removed style sheet is no longer
applied to the presentation of the document.
</p>
</def>
</gitem>
<gitem>
<label>XML and Style Sheet Creation</label>
<def>
<p>
A new style sheet can be created and associated with an XML
document by creating a processing instruction with the target
'xml-stylesheet' <bibref ref="XML-StyleSheet"/> and inserting it
into the document.
</p>
</def>
</gitem>
<gitem>
<label>XML and Style Sheet Removal</label>
<def>
<p>
Removing a processing instruction with a target of 'xml-stylesheet'
<bibref ref="XML-StyleSheet"/> removes the underlying style sheet
from the style sheet collection associated with a document.
Specifically, the removed style sheet is no longer applied to the
presentation of the document.
</p>
</def>
</gitem>
</glist>
</div2>
</div1>
<!--
*************************************************************************
* END OF LEVEL TWO STYLE SHEETS *
*************************************************************************
-->