Filing a writ doesn't usually stay the case. Also writs are generally denied because it is rare that there is sufficient reason to grant it. If you're counting on a writ, that probably won't happen. They are usually decided within a few days because of their nature.
This is not a comprehensive answer and it is impossible to provide a meaningful response without a consultation. Call us for more information. 619.797.5456 www.mataelelaw.com
You say the trial judge denied your request for a stay. So, unless the appellate division stays your case pending its decision on the merits of your petition, then your case will be heard on its merits at the already scheduled time. You ask: "Should I attend trial [?]" If you do not, you will lose by default. Now, it is possible the appellate division will give you the stay you want, but not likely. Whether there is any merit to your petition, no one here can say since we are not familiar with all the facts of your case or the proceedings in your case so far, nor have we read your petition.
If you want to know more about writs, then you should go to the county law library and look up a book entitled California Civil Writ Practice which is published by California Continuing Education of the Bar (CCEB).
Cal. Bar No. 104800
Wis. Bar No. 1020123
Member: U.S. Supreme Court Bar.