001/*
002 * Copyright (c) 2000 World Wide Web Consortium,
003 * (Massachusetts Institute of Technology, Institut National de
004 * Recherche en Informatique et en Automatique, Keio University). All
005 * Rights Reserved. This program is distributed under the W3C's Software
006 * Intellectual Property License. This program is distributed in the
007 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
008 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
009 * PURPOSE.
010 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
011 */
012
013package org.w3c.dom.stylesheets;
014
015import org.w3c.dom.Node;
016
017/**
018 *  The <code>StyleSheet</code> interface is the abstract base interface for 
019 * any type of style sheet. It represents a single style sheet associated 
020 * with a structured document. In HTML, the StyleSheet interface represents 
021 * either an external style sheet, included via the HTML  LINK element, or 
022 * an inline  STYLE element. In XML, this interface represents an external 
023 * style sheet, included via a style sheet processing instruction. 
024 * <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>.
025 * @since DOM Level 2
026 */
027public interface StyleSheet {
028    /**
029     *  This specifies the style sheet language for this style sheet. The 
030     * style sheet language is specified as a content type (e.g. 
031     * "text/css"). The content type is often specified in the 
032     * <code>ownerNode</code>. Also see the type attribute definition for 
033     * the <code>LINK</code> element in HTML 4.0, and the type 
034     * pseudo-attribute for the XML style sheet processing instruction. 
035     */
036    public String getType();
037
038    /**
039     *  <code>false</code> if the style sheet is applied to the document. 
040     * <code>true</code> if it is not. Modifying this attribute may cause a 
041     * new resolution of style for the document. A stylesheet only applies 
042     * if both an appropriate medium definition is present and the disabled 
043     * attribute is false. So, if the media doesn't apply to the current 
044     * user agent, the <code>disabled</code> attribute is ignored. 
045     */
046    public boolean getDisabled();
047    /**
048     *  <code>false</code> if the style sheet is applied to the document. 
049     * <code>true</code> if it is not. Modifying this attribute may cause a 
050     * new resolution of style for the document. A stylesheet only applies 
051     * if both an appropriate medium definition is present and the disabled 
052     * attribute is false. So, if the media doesn't apply to the current 
053     * user agent, the <code>disabled</code> attribute is ignored. 
054     */
055    public void setDisabled(boolean disabled);
056
057    /**
058     *  The node that associates this style sheet with the document. For HTML, 
059     * this may be the corresponding <code>LINK</code> or <code>STYLE</code> 
060     * element. For XML, it may be the linking processing instruction. For 
061     * style sheets that are included by other style sheets, the value of 
062     * this attribute is <code>null</code>. 
063     */
064    public Node getOwnerNode();
065
066    /**
067     *  For style sheet languages that support the concept of style sheet 
068     * inclusion, this attribute represents the including style sheet, if 
069     * one exists. If the style sheet is a top-level style sheet, or the 
070     * style sheet language does not support inclusion, the value of this 
071     * attribute is <code>null</code>. 
072     */
073    public StyleSheet getParentStyleSheet();
074
075    /**
076     *  If the style sheet is a linked style sheet, the value of its attribute 
077     * is its location. For inline style sheets, the value of this attribute 
078     * is <code>null</code>. See the href attribute definition for the 
079     * <code>LINK</code> element in HTML 4.0, and the href pseudo-attribute 
080     * for the XML style sheet processing instruction. 
081     */
082    public String getHref();
083
084    /**
085     *  The advisory title. The title is often specified in the 
086     * <code>ownerNode</code>. See the title attribute definition for the 
087     * <code>LINK</code> element in HTML 4.0, and the title pseudo-attribute 
088     * for the XML style sheet processing instruction. 
089     */
090    public String getTitle();
091
092    /**
093     *  The intended destination media for style information. The media is 
094     * often specified in the <code>ownerNode</code>. If no media has been 
095     * specified, the <code>MediaList</code> will be empty. See the media 
096     * attribute definition for the <code>LINK</code> element in HTML 4.0, 
097     * and the media pseudo-attribute for the XML style sheet processing 
098     * instruction . Modifying the media list may cause a change to the 
099     * attribute <code>disabled</code>. 
100     */
101    public MediaList getMedia();
102
103}