I dont understand, what do you have and what do you want to accomplish?
Do you want to use a 12V battery to power an AC circuit or where does the transformer come in?
Or do you want the transformer to charge the battery?
The schematic that you have attached takes 14V DC input,
then regulates that to something between 8V and 12V DC,
then regulates that output to 5V DC.
The capacitors are used for filtering.
The 5V output can supply around 1A.
The 14VDC input to the charger is too low to charge the battery.
The battery will be about 13.8V when fully charged. The diode will have about 0.7V across it so the output of the LM317 should be 14.5V when its load current is low.
The LM317 needs an input that is at least 1.8V higher than its output so its input should be at least 16.3V. Use 18V.
The battery charger provides about 600mA. The load uses 300mA. Then there will always be 300mA to 600mA available to charge the battery even when the load is powered.
The 1 ohm resistor feeding the BC547 transistor limits the current to 600mA. You can have 300mA at 13V plus 300mA at 5V or any combination that adds up to 600mA.
The charging voltage must be 14.6 to 15 v, and when the battery is charged the voltage of the charger must be lowered to 13.6 to 13.8 v max otherwise the battery will be overcharged and its life span will be decreased .