A policeman was stabbed, an assailant shot and several people injured in an attack near the parliament which police say they're treating as terrorism-related.