if (ret[0] == null) continue; names[0] = (CSSName) ret[0]; primitives[0] = new FSCssValue((CSSPrimitiveValue) ret[1]);
    protected Iterator doBuildDeclarations(CSSPrimitiveValue[] primVals,                                           boolean important,                                           CSSName cssName,                                           int origin) {        List declarations = new ArrayList();        CSSPrimitiveValue primitive = null;        CSSPrimitiveValue primitives[] = new CSSPrimitiveValue[1];        CSSName[] names = new CSSName[1];        CSSPrimitiveValue bgPosPrimitive = null;        StringBuffer bgPos = null;        String val = null;        FSCssValue fsCssValue = null;        for (int i = 0; i < primVals.length; i++) {            primitive = primVals[i];            val = primitive.getCssText().trim();            // sniff this one value out. using an array to return            // multiple pieces of info; see parseSingle() method            Object[] ret = parseSingle(val, primitive, bgPos);            if (ret[0] == null) continue;            names[0] = (CSSName) ret[0];            primitives[0] = new FSCssValue((CSSPrimitiveValue) ret[1]);            // handle background-position. the issue here is that            // the position will have either one or two assignments            // (e.g. top, top left), both of (as a pair) are the actual assigned            // CSS value (for the background-position property), as there            // is no background-position-x/y. so while we call parseSingle()            // once for each element in the property assignment, we need            // to keep track of a bg position across multiple invocations.            //            // to make this worse, if both values for the position are given            // they must appear as a pair (top left) without intervening properties,            // whereas all other properties can be given in any order.            if (((Boolean) ret[4]).booleanValue()) {                if (bgPos == null) {                    bgPos = (StringBuffer) ret[2];                }                if (bgPosPrimitive == null) {                    bgPosPrimitive = (CSSPrimitiveValue) ret[3];                }                continue;            }            addProperties(declarations, primitives, names, origin, important);        }        if (bgPos != null) {            val = bgPos.toString().trim();            val = BackgroundPositionPropertyDeclarationFactory.canonicalizeValue(val);            bgPosPrimitive.setCssText(val);            names[0] = CSSName.BACKGROUND_POSITION;            primitives[0] = new FSCssValue(bgPosPrimitive, val);            addProperties(declarations, primitives, names, origin, important);        }        return declarations.iterator();    }