You see, you can't really train a cat to never go out especially if it was a male. However, if you turn things backwards in a cat's mind it should decide to stay in. For example if you live in an apartment or a building you can make sure the outside door is closed so no dogs can get in and when your kitten runs out you close the door behind it and pretend you won't let her in, or you yourself throw her out and close the door behind her whenever she displays a bad behaviour ( that's only if she understands it's punishment though) and if she begs to come back in keep her out for some time so she would wish to come back in. This seems cruel but the cat has to learn about threats. And in this case the threat will be that she won't be able to come back home if she keeps deciding to go out.
If you try to stop your cat from going out it will probably want to do so even more. Just like kids. If the cat doesn't decide to stay in there's noway you can keep her in forever.
If you do not live in an apartment and whenever your cat is out the door she be pretty much in the outside world you shouldn't put her outside unless you are sure no stray is around. Now that she was attacked before by dogs she probably recognizes dogs as threats, so you can have a friend who owns a well trained dog to come over and keep the dog in your yard and possibly bark at the cat when it comes out. That way she should atleast be more careful whenever she decides to step outside.
Cats don't follow rules, they follow their own decisions. And to make a cat go your way, you must give them reasons to make you decisions. You should show her that the best place in the world is your home, and outside is boring (no human contact or play or treats) and dangerous. Make your home a comfortable place for your kitten by providing lots of toys and play with your cat and give it treats when it plays good, even consider training your cat to do tricks and getting praised. Try to let it use it's full energy on play and it will never go outside because it would be sleeping. Get the cat great foods and treats. It will soon realize that home is much more fun and nice than the outdoors.