Question: How were the walls built with the intended purpose for batle?
About the article "Forbidden City", section "Walls and gates".

Candidate passages:
Apart from those instances where town walls date from the Roman period, building walls in stone only started in Austria in the late 12th and the 13th centuries.
The defence of towns was only a minor consideration, and it was castles which were highly defended and subject to sieges.
The purpose of walls was to extract market and other tolls from people entering or leaving the town, to demarcate an area where craftsmen could work freely without being subject to feudal service and dues, and to provide basic security for the inhabitants.
The gate-towers, which in Austria were often tall and impressive structures, were used for the collection of tolls.
In many Austrian towns the gatehouses are positioned at either end of a long rectangular or spindle shaped market place.
In the case of the rectangular market places, one or two houses will partly close off the area in front of the gatehouses, causing a constriction to funnel people through the gatehouse.
The spindle shaped market-places also funnelled people through the gatehouses at either end.
Little detailed work has yet been undertaken on how walls were constructed.
The exception to this are the studies on the walls at Drosendorf, Zwettl, Horn and Freistadt.
At Zwettl walls have been built in short sections, corresponding to adjacent burgage holdings, suggesting that particular length of wall was the responsibility of the burgage holder.
The walls at Drosendorf do not appear to have been built by professional masons and there is widespread of use of Opus spicatum, a herringbone arrangement of building stones, which also occurs in Romanesque church buildings.
This contrasts with the walls at Grossenzersdorf, where masons from the Stephans Dom in Vienna built 2.2 kilometers of wall between 1396 and 1399, using reclaimed stone and tile from the Roman site at Carnuntum. 
Each of the cells were originally provided with three excellently built corbelled niches in the inner walls, the one in the back wall being larger.
Objects recovered in and around them strongly indicate that these were primarily intended for keeping votive images, oil lamps and reading and writing materials. 
At its most simple, a defensive wall consists of a wall enclosure and its gates.
For the most part, the top of the walls were accessible, with the outside of the walls having tall parapets with embrasures or merlons.
North of the Alps, this passageway at the top of the walls occasionally had a roof.
In addition to this, many different enhancements were made over the course of the centuries:  City ditch: a ditch dug in front of the walls, occasionally filled with water.
Gate tower: a tower built next to, or on top of the city gates to better defend the city gates.
Wall tower: a tower built on top of a segment of the wall, which usually extended outwards slightly, so as to be able to observe the exterior of the walls on either side.
In addition to arrow slits, ballistae, catapults and cannons could be mounted on top for extra defence.
Pre-wall: wall built outside the wall proper, usually of lesser height — the space in between was usually further subdivided by additional walls.
Additional obstacles in front of the walls.
The defensive towers of west and south European fortifications in the Middle Ages were often very regularly and uniformly constructed (cf.
Ávila, Provins), whereas Central Europeancity walls tend to show a variety of different styles.
In these cases the gate and wall towers often reach up to considerable heights, and gates equipped with two towers on either side are much rarer.
Apart from having a purely military and defensive purpose, towers also played a representative and artistic role in the conception of a fortified complex.
The architecture of the city thus competed with that of the castle of the noblemen and city walls were often a manifestation of the pride of a particular city.
Urban areas outside the city walls, so-called Vorstädte, were often enclosed by their own set of walls and integrated into the defense of the city.
These areas were often inhabited by the poorer population and held the "noxious trades".
In many cities, a new wall was built once the city had grown outside of the old wall.
This can often still be seen in the layout of the city, for example in Nördlingen, and sometimes even a few of the old gate towers are preserved, such as the "white tower" in Nuremberg.
Additional constructions prevented the circumvention of the city, through which many important trade routes passed, thus ensuring that tolls were paid when the caravans passed through the city gates, and that the local market was visited by the trade caravans.
Furthermore, additional signaling and observation towers were frequently built outside the city, and were sometimes fortified in a castle-like fashion.
The border of the area of influence of the city was often partially or fully defended by elaborate ditches, walls and/or hedges.
The crossing points were usually guarded by gates or gate houses.
These defenses were regularly checked by riders, who often also served as the gate keepers.
Long stretches of these defenses can still be seen to this day, and even some gates are still intact.
To further protect their territory, rich cities also established castles in their area of influence.
A famous example of this practice is the Romanian "Dracula Castle" at Bran/Törzburg, which was intended to protect Kronstadt (today's Braşov).
The city walls were often connected to the fortifications of hill castles via additional walls .
Thus the defenses were made up of city and castle fortifications taken together.
Several examples of this are preserved, for example in Germany Hirschhorn on the Neckar, Königsberg and Pappenheim, Franken, Burghausen in Oberbayern and many more.
A few castles were more directly incorporated into the defensive strategy of the city (e.g.
Nuremberg, Zons, Carcassonne), or the cities were directly outside the castle as a sort of "pre-castle" (Coucy-le-Chateau, Conwy and others).
Larger cities often had multiple stewards — for example Augsburg was divided into a Reichstadt and a bishopal (clerical) city.
These different parts were often separated by their own fortifications.
With the development of firearms came the necessity to expand the existing installation, which occurred in multiples stages.
Firstly, additional, half-circular towers were added in the interstices between the walls and pre-walls (s.a.) in which a handful of cannons could be placed.
Soon after, reinforcing structures — or "bastions" — were added in strategically relevant positions, e.g.
at the gates or corners.
A well-preserved example of this is the "Spitalbastei" in Rothenburg or the bastions built as part of the 17th-century walls surrounding Derry, a city in Ulster in the north of Ireland; however, at this stage the cities were still only protected by relatively thin walls which could offer little resistance to the cannons of the time.
Therefore new, star forts with numerous cannons and thick earth walls reinforced by stone were built.
These could resist cannon fire for prolonged periods of time.
However, these massive fortifications severely limited the growth of the cities, as it was much more difficult to move them as compared to the simple walls previously employed — to make matters worse, it was forbidden to build "outside the city gates" for strategic reasons and the cities became more and more densely populated as a result. 
A fallout shelter is a shelter designed specifically for a nuclear war, with thick walls made from materials intended to block the radiation from fallout resulting from a nuclear explosion.
Many such shelters were constructed as civil defense measures during the Cold War.
A blast shelter protects against more conventional bomb blasts.
Its main purpose is to protect from shock waves and overpressure.  
Built primarily of stone, the Academy features ashlar walls with a rough appearance.
Most parts of the building are two or three stories tall, although the intended English castle appearance is responsible for the presence of a four-story tower.
Visitors enter through a portico dominated by pointed arches: both the main entrance and the sidelights employ the design, as does a window placed under the main part of the tower.
Such windows, emblematic of the Gothic Revival style, were also used for later construction; they form a crucial component of an attached chapel built during the school's occupation of the building.
Inside, hand-carven wood panelling is exceptionally extensive: the Swiss woodworkers whom Neff hired for the purpose required two full years of work to complete the carvings.