%
% API Documentation for cssutils
% Module cssutils.parse'
%
% Generated by epydoc 3.0.1
% [Fri Feb 01 19:05:21 2008]
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                          Module Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{cssutils \textit{(package)}!cssutils.parse' \textit{(module)}|(}
\section{Module cssutils.parse'}

    \label{cssutils:parse'}

a validating CSSParser
\textbf{Version:} \$LastChangedRevision: 751 \$



\textbf{Date:} \$LastChangedDate: 2007-12-28 12:35:14 +0100 (Fr, 28 Dez 2007) \$



\textbf{Author:} \$LastChangedBy: cthedot \$




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           Class Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{cssutils \textit{(package)}!cssutils.parse' \textit{(module)}!cssutils.parse'.CSSParser \textit{(class)}|(}
\subsection{Class CSSParser}

    \label{cssutils:parse':CSSParser}
\begin{tabular}{cccccc}
% Line for object, linespec=[False]
\multicolumn{2}{r}{\settowidth{\BCL}{object}\multirow{2}{\BCL}{object}}
&&
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
  \\
&&\multicolumn{2}{l}{\textbf{cssutils.parse'.CSSParser}}
\end{tabular}


parses a CSS StyleSheet string or file and
returns a DOM Level 2 CSS StyleSheet object

Usage:
\begin{quote}{\ttfamily \raggedright \noindent
parser~=~CSSParser()~\\
stylesheet~=~p.parse('test1.css',~'ascii')~\\
~\\
print~stylesheet.cssText
}\end{quote}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                Methods                                %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Methods}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_init\_\_}(\textit{self}, \textit{log}={\tt None}, \textit{loglevel}={\tt None}, \textit{raiseExceptions}={\tt False})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
\begin{description}
\item[{log}] \leavevmode 
logging object

\item[{loglevel}] \leavevmode 
logging loglevel

\item[{raiseExceptions}] \leavevmode 
if log should simple log (default) or raise errors

\end{description}
\setlength{\parskip}{1ex}
      Overrides: object.\_\_init\_\_

    \end{boxedminipage}

    \label{cssutils:parse':CSSParser:parseString}
    \index{cssutils \textit{(package)}!cssutils.parse' \textit{(module)}!cssutils.parse'.CSSParser \textit{(class)}!cssutils.parse'.CSSParser.parseString \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{parseString}(\textit{self}, \textit{cssText}, \textit{href}={\tt None}, \textit{media}={\tt None})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}

parse a CSSStyleSheet string
returns the parsed CSS as a CSSStyleSheet object
\begin{description}
\item[{cssText}] \leavevmode 
CSS string to parse

\item[{href}] \leavevmode 
The href attribute to assign to the generated stylesheet

\item[{media}] \leavevmode 
The media attribute to assign to the generated stylesheet
(may be a MediaList, list or a string)

\end{description}
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{cssutils:parse':CSSParser:parse}
    \index{cssutils \textit{(package)}!cssutils.parse' \textit{(module)}!cssutils.parse'.CSSParser \textit{(class)}!cssutils.parse'.CSSParser.parse \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{parse}(\textit{self}, \textit{filename}, \textit{encoding}={\tt None}, \textit{href}={\tt None}, \textit{media}={\tt None})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}

parse a CSSStyleSheet file
returns the parsed CSS as a CSSStyleSheet object
\begin{description}
\item[{filename}] \leavevmode 
name of the CSS file to parse

\item[{encoding}] \leavevmode 
of the CSS file, defaults to 'css' codec encoding

\item[{href}] \leavevmode 
The href attribute to assign to the generated stylesheet

\item[{media}] \leavevmode 
The media attribute to assign to the generated stylesheet
(may be a MediaList or a string)

\end{description}
\setlength{\parskip}{1ex}
    \end{boxedminipage}


\large{\textbf{\textit{Inherited from object}}}

\begin{quote}
\_\_delattr\_\_(), \_\_getattribute\_\_(), \_\_hash\_\_(), \_\_new\_\_(), \_\_reduce\_\_(), \_\_reduce\_ex\_\_(), \_\_repr\_\_(), \_\_setattr\_\_(), \_\_str\_\_()
\end{quote}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                              Properties                               %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Properties}

    \vspace{-1cm}
\hspace{\varindent}\begin{longtable}{|p{\varnamewidth}|p{\vardescrwidth}|l}
\cline{1-2}
\cline{1-2} \centering \textbf{Name} & \centering \textbf{Description}& \\
\cline{1-2}
\endhead\cline{1-2}\multicolumn{3}{r}{\small\textit{continued on next page}}\\\endfoot\cline{1-2}
\endlastfoot\multicolumn{2}{|l|}{\textit{Inherited from object}}\\
\multicolumn{2}{|p{\varwidth}|}{\raggedright \_\_class\_\_}\\
\cline{1-2}
\end{longtable}

    \index{cssutils \textit{(package)}!cssutils.parse' \textit{(module)}!cssutils.parse'.CSSParser \textit{(class)}|)}
    \index{cssutils \textit{(package)}!cssutils.parse' \textit{(module)}|)}
