All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.css.values.CssURL

java.lang.Object
   |
   +----org.w3c.css.values.CssValue
           |
           +----org.w3c.css.values.CssURL

public class CssURL
extends CssValue

   URL

A Uniform Resource Locator (URL) is identified with a functional notation:

   BODY { background: url(http://www.bg.com/pinkish.gif) }
   

The format of a URL value is 'url(' followed by optional white space followed by an optional single quote (') or double quote (") character followed by the URL itself (as defined in [11]) followed by an optional single quote (') or double quote (") character followed by optional whitespace followed by ')'. Quote characters that are not part of the URL itself must be balanced.

Parentheses, commas, whitespace characters, single quotes (') and double quotes (") appearing in a URL must be escaped with a backslash: '\(', '\)', '\,'.

Partial URLs are interpreted relative to the source of the style sheet, not relative to the document:

   BODY { background: url(yellow) }
   
See also

[11] T Berners-Lee, L Masinter, M McCahill: "Uniform Resource Locators (URL)", RFC 1738, CERN, Xerox Corporation, University of Minnesota, December 1994


Constructor Index

 o CssURL()

Method Index

 o equals(Object)
Compares two values for equality.
 o get()
Get the internal value.
 o getURL()
Returns the URL
 o set(String, Frame)
Set the value of this URL. Deprecated.
 o set(String, Frame, URL)
Set the value of this URL.
 o toString()
Returns a string representation of the object.

Constructors

 o CssURL
 public CssURL()

Methods

 o set
 public void set(String s,
                 Frame frame) throws InvalidParamException
Note: set() is deprecated.

Set the value of this URL.

Parameters:
s - the string representation of the URL.
frame - For errors and warnings reports.
Throws: InvalidParamException
The unit is incorrect
Overrides:
set in class CssValue
 o set
 public void set(String s,
                 Frame frame,
                 URL base) throws InvalidParamException
Set the value of this URL.

Parameters:
s - the string representation of the URL.
frame - For errors and warnings reports.
base - the base location of the style sheet
Throws: InvalidParamException
The unit is incorrect
 o get
 public Object get()
Get the internal value.

Overrides:
get in class CssValue
 o getURL
 public URL getURL() throws MalformedURLException
Returns the URL

 o toString
 public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
 o equals
 public boolean equals(Object url)
Compares two values for equality.

Parameters:
value - The other value.
Overrides:
equals in class CssValue

All Packages  Class Hierarchy  This Package  Previous  Next  Index