                 if (xml.hasSimpleContent())
                 {
                     content = new SimpleContent(xml.text().toString());
-                    propertyList = xml.attributes();
+                    propertyList = filterAttributes(xml.attributes());
+
+                    // If the attributes were filtered out, we just have a
+                    // simple value. 
+                    if (propertyList.length() == 0)
+                    {
+                        return schemaManager.unmarshall(xml, type, restriction);
+                    }
                 }
                 else
                 {

    }

    /**
     * Noop. Method exists to give a chance to subclasses to pre-process the
     * encoded XML.
     * @private

                        ContentProxy(content).object_proxy::isSimple = false; // The XML value has complex content.

                    propertyList = xml.elements();
                    propertyList += filterAttributes(xml.attributes()); 
                }
            }
            else
