Preparations for a major shakeup of China's Communist Party leadership are all but complete, ahead of a national congress that begins in Beijing on Wednesday. President Xi Jinping, the party boss, is expected to cement his already considerable power and embark on a second five-year term.

Last Saturday, in an auditorium bedecked with red flags and hammer-and-sickle emblems, the party's outgoing central committee members raised their hands in unison to approve the congress's final preparations.

Beijing's streets are lined with security personnel, and police have hustled dissidents out of town on enforced "vacations" ahead of the country's most important political event.

Held every five years, the National Congress of the Chinese Communist Party is a piece of political theater that University of Victoria political scientist Wu Guoguang describes as being at once "holy" and "hollow."

When it comes to understanding exactly how the leader of the world's most populous nation is chosen, "In fact, nobody knows," Wu says. "It's jungle politics," he adds. "The party does not play the game by its own rules."

According to the Communist Party's charter, China's nearly 90 million party members select nearly 2,300 delegates, who in turn vote for a roughly 200-member central committee. That committee then elects a 25-odd-member Politburo, a standing committee having between five and nine members and the party's general secretary or top leader.

But in fact, "The election is a formality," Wu says. "The positions are decided in advance of the congress." Then they're given to the delegates to rubber-stamp.

The actual selection of the party leadership, Wu adds, is done "in a black box" behind closed doors.

In other words, while power appears to flow from the bottom up, it actually goes from the top down.

Experts' best guess, Wu says, is that around 20 people, including serving and retired members of the Politburo standing committee, bargain in secret to decide the next leader several months before the congress.

In theory, the national congress is the party's highest organ of power. But Wu, the author of China's Party Congress: Power, Legitimacy, and Institutional Manipulation, who helped draft political reforms for the late Chinese Premier and Communist Party boss Zhao Ziyang, says that the leadership has many ways to manipulate the institution to make sure nobody it dislikes is ever nominated — much less elected.

One such device is a sort of straw poll or dry run ahead of the congress, so that leaders can sniff out and neutralize opposition to their preferred candidates.

The selection process is full of uncertainty, says Wu. This uncertainty may be behind the event's massive security operations, to which "every blade of grass, every tree looks like an enemy soldier," as the old Chinese saying goes.

Part of the problem is that so many successions under communist rule have ended in failure. Three of Mao Zedong's anointed heirs, Liu Shaoqi, Lin Biao and Hua Guofeng, were purged or sidelined.

Liu was purged and persecuted during the Cultural Revolution and died in 1969. Lin died in a 1971 plane crash, after an alleged failed coup attempt. Hua served as party chairman for five years until Deng Xiaoping pushed him aside in 1981.

During the 1980s, supreme leader Deng sacked two of his appointed successors in a row, ostensibly because they were soft on dissent.

Experts point out that China has neither a hereditary dynasty nor competitive elections. To restore a semblance of order to the leadership selection process in the years following the June 4, 1989, massacre near Tiananmen Square, the party established some unwritten rules or norms to govern it.

The most important of these is an informal rule that Politburo standing committee members must retire at age 68.

But experts believe that Xi is not satisfied with the informal rules and intends to bend, break or scrap them altogether.

And if there is any unwritten rule experts say Xi cannot tolerate, it is one that could hinder his ability to designate his own successor. In Chinese politics, this is a guarantee of a retired leader's survival and continuing behind-the-scenes influence.

Years ago, supreme leader Deng is believed to have anointed two of Xi's predecessors. They in turn apparently designated two men, Sun Zhengcai and Hu Chunhua, as Xi's possible successors.

But in July, Sun was sacked for corruption and violating party discipline as party boss of southwest China's Chongqing city, and Xi signaled that he would not accept anyone else's choice as his heir. Hu remains in place, at least for now.

Mao, Deng and many Chinese emperors centuries before them essentially ruled until they died. China's Constitution mandates a two-term limit for its presidents, but there are no term limits for party leaders, who are above the president.

Xi serves as president, party leader and head of the military. During his first term, he outdid his predecessors with tough crackdowns on both dissent and official corruption at home along with a muscular military posture to back up China's territorial claims in the South China Sea and the China-India border. Experts expect more of the same from a second Xi term.

Xi is not the first to challenge the party's informal leadership succession rules. Bo Xilai, a flamboyant politician who also served as Chongqing party boss, questioned personnel arrangements for the 18th party congress in 2012, as he sought to enter the leadership's top ranks. He challenged the leadership lineup — which included Xi — that was decided by Xi's predecessors. The following year, Bo was sentenced to life in prison on corruption charges.

Hong Kong University of Science and Technology professor Ding Xueliang argues that Xi has wanted to overhaul the succession process for years, especially since Bo's challenge.

"Even now," Ding says, "Xi still talks about the 'residual toxic influence' of Bo Xilai in Chongqing," presumably a reference to the fact that some of Bo's allies or subordinates remain in positions of power.

Indeed, Xi has spent much of his first term getting rid of the masses of bureaucrats installed by, and still loyal to, his predecessors, lest they rebel or obstruct the implementation of his policies.

This reflects the fact, Ding observes, that personal ties remain paramount in Chinese politics and bureaucrats tend to "obey those who appointed them."

Communist personnel policies, Ding notes, make it hard to sack bureaucrats before they retire, and the bureaucrats are not subject to much independent oversight.

Ding argues that Xi has used his mass anti-corruption campaign as a tool to knock out not just rival politicians and obstinate bureaucrats but also party congress delegates. He notes that Chairman Mao did the same during the 1966-1975 Cultural Revolution.

At the 19th party congress, experts will be looking at several key details. Here are some of the questions they are asking:

  • Will Xi show any indication that he might seek a third term as president, beginning in 2022? Or will he retire from his party and government posts but hang on as military chief, as some of his predecessors have done?
  • Will Wang Qishan, Xi's 69-year-old right-hand man and anti-corruption czar, retain his job? He is already past the age after which no party leaders are supposed to be appointed to new positions, according to an informal rule.
  • Will Xi change his job title from general secretary of the Communist Party to chairman, the title Mao used?
  • Will Xi name a successor during the party congress?
  • Will Xi's ideas be written into the party charter as "Xi Thought" or "Xi Theory," as were the ideas of Mao and Deng? Or will his ideas be written into the charter without Xi's name, as was the case with Xi's two less powerful immediate predecessors?

If Xi breaks the informal rules, observes Ding, the Hong Kong professor, it's not clear what new ones he might replace them with.
And maybe it doesn't matter. Neither formal nor informal rules have done much to constrain China's leaders. Deng famously remained paramount leader in retirement with no higher official title than honorary chairman of the China Bridge Association.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.