protected void appendCssNode(HttpServletRequest request, Document document, DocumentFragment head, Css css, String relativeRoot) {
        final String stylePath = getElementPath(request, css, relativeRoot);

        if (resourcesDao.isConditional(css)) {
            Comment c = document.createComment("");
            c.appendData(OPEN_COND_COMMENT_PRE);
            c.appendData(css.getConditional());
            c.appendData(OPEN_COND_COMMENT_POST);
            c.appendData(OPEN_STYLE);
            c.appendData(stylePath);
            if (StringUtils.isNotBlank(css.getMedia())) {
                c.appendData("\" media=\"");
                c.appendData(css.getMedia());
            }
            c.appendData(CLOSE_STYLE);
            c.appendData(CLOSE_COND_COMMENT);
            head.appendChild(c);
        }
        else {
            Element element = document.createElement(LINK);
            element.setAttribute(REL, "stylesheet");
            element.setAttribute(TYPE, "text/css");
            element.setAttribute(HREF, stylePath);
            if (StringUtils.isNotBlank(css.getMedia())) {
                element.setAttribute(MEDIA, css.getMedia());
            }
            head.appendChild(element);
        }
    }
protected void appendCssNode ( HttpServletRequest request , Document document , DocumentFragment head , Css css , String relativeRoot ) { final String stylePath = getElementPath ( request , css , relativeRoot ) ; if ( resourcesDao . isConditional ( css ) ) { Comment c = document . createComment ( "" ) ; c . appendData ( OPEN_COND_COMMENT_PRE ) ; c . appendData ( css . getConditional ( ) ) ; c . appendData ( OPEN_COND_COMMENT_POST ) ; c . appendData ( OPEN_STYLE ) ; c . appendData ( stylePath ) ; if ( StringUtils . isNotBlank ( css . getMedia ( ) ) ) { c . appendData ( "\" media=\"" ) ; c . appendData ( css . getMedia ( ) ) ; } c . appendData ( CLOSE_STYLE ) ; c . appendData ( CLOSE_COND_COMMENT ) ; head . appendChild ( c ) ; } else { Element element = document . createElement ( LINK ) ; element . setAttribute ( REL , "stylesheet" ) ; element . setAttribute ( TYPE , "text/css" ) ; element . setAttribute ( HREF , stylePath ) ; if ( StringUtils . isNotBlank ( css . getMedia ( ) ) ) { element . setAttribute ( MEDIA , css . getMedia ( ) ) ; } head . appendChild ( element ) ; } }
Convert the {@link Css} argument to an HTML link tag and append it
to the {@link DocumentFragment}.