serializeTo.addAttribute( ATTRIBUTE_DEPENDENT, String.valueOf( object.isDependentType() ) );
serializeTo.addElement( serializeTo.getNamespace(), ELEMENT_ID ).addCharacters( object.getId() );
serializeTo.addElement( serializeTo.getNamespace(), ELEMENT_CONTENT_TYPE ).addCharacters( object.getContentType() );
for ( Extension extension : object.getExtensions() ) {
SMOutputElement extensionElement = serializeTo.addElement( serializeTo.getNamespace(), ELEMENT_EXTENSION );
if ( object.isDefaultExtension( extension ) ) {
extensionElement.addAttribute( ATTRIBUTE_DEFAULT, String.valueOf( true ) );
}
serialize( extension, Extension.class, extensionElement, formatVersion );
}
}