exactly ... speaker has to remain within realms of the constitution, he can`t declare man a woman or vice versa, similarly he can`t invent law that he can force any member of the Parliament not to vote on any issue including no confidence move unless member is legally suspended, he has no such authority.
What realm of constitutions?
Any member of parliament ( and the speaker is a member) can say whatever on Floor of the house and cannot be held accountable in any court. If a member ON the floor says that "A man is a women," none can hold him/her (legally) accountable , as a person or as a house. Voter is the judge what he/she says on the floor.
House proceedings are limited to running of the affairs of the house, the speaker is concerned to by constitution - for running/presiding the house. The proceedings relates to how and with rules the laws are passed. Proceeding do not relate to what laws are pass, which is by a majority of members And a speaker rarely votes. for a law unless necessary.
Parliament's majority can make ANY law - in accordance with the rules of House.
The rules of the house are made by the house itself (except for those election listed in the constitution (i.e. speaker, pm, etc). Any speaker's ruling become a procedure, however a speaker generally follow a) house tradition , b) foreign house traditions and c) past ruling along with decisions of house committee for rules. But a speaker can decide whatever beyond the norms. So to answer you, s a majority can pass a law that A man is a women, following house procedures. There is no bar in the constitution not to pass such a law.- but of course such a crazy law will be challenged in the court and rejected.
( There are a few operative bars regarding budget and money bills matters and for Secrecy acts, war conduct because that is partially the job of PM or relate to national security)
There are preambles in the constitution which state purposes, and aims of the state and the nation. A parliament is expected to follow preambles or fulfill its basic duty to achieve goals given in preambles..
However, preambles are not the laws and cannot become the basis of a case in the court. (for example the preambles say everyone should be provided education as a basic right but one cannot file a case for violating constitution on this basis)
So the court adjudges only on the laws passed by the Parliaments. It judges those laws on the basis of a) that the aims and functions in preambles are followed and not negated, b) Natural justice for example fairness, c) Common laws which are the past decisions of the courts inland or abroad d) in part on literal wordings in the constitution and e) the intent of the original constitution makers.
Parliament is supreme - it can pass a law whatever and its members can think and interpret of preambles whatever. Of course, if they make a blundered, they will be snubbed in no time in the court and by the public and will be practically stopped by administration.