org.xwiki.portlet.view
Class CSSStyleSheetFilter
java.lang.Object
org.xwiki.portlet.view.CSSStyleSheetFilter
public class CSSStyleSheetFilter
- extends Object
Rewrites a CSS stream so that it can be used by a portlet in a portal page without affecting other portlets or the
portal page itself. The following transformations are executed:
- Name-space all CSS selectors by prefixing them with a given string (e.g. the identifier of the portlet content
container)
- Rename identifiers used in selectors to ensure their uniqueness inside the portal page
- Rewrite import URLs so that CSS style sheets are requested through the portlet
.
- Version:
- $Id: eb4158c26d608589bc9ee9231b628ad10de04c61 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSSStyleSheetFilter
public CSSStyleSheetFilter(String namespace,
URLRewriter urlRewriter)
- Creates a new
CSSStyleSheet filter that rewrites import URLs using the given URL rewriter and name-spaces
all style rules using the given name-space.
- Parameters:
namespace - the string used to name-space all style rules and element identifiers used in CSS selectorsurlRewriter - the object used to rewrite URLs
filter
public void filter(org.w3c.dom.css.CSSStyleSheet styleSheet)
- Parameters:
styleSheet - the style sheet to be filtered
Copyright © 2004-2013 XWiki. All Rights Reserved.