I am looking for a reference on the gluing together of strong Markov processes to get a new one.

Here is an example of what I have in mind. Let $B^1, B^2, \ldots $ be independent one-dimensional Brownian motions started at $0$ and $\tau_i$ be the first time $B^i$ hits $1$. Construct a new process $Y$ as follows. Let $Y(t)=B^1(t)$ for $t<\tau_1$, $Y(t)=1-B^2(t-\tau_1)$ for $\tau_1 \leq t<\tau_1+\tau_2$, $Y(t)=B^3(t-\tau_1-\tau_2)$ for $\tau_1+\tau_2\leq t <\tau_1+\tau_2+\tau_3$ and so on. I would like to conclude that the this construction gives a strong Markov process (in fact its a Brownian motion).

More generally, suppose I have a suitably nice topological space $E$ and open sets $U_1, \ldots, U_n$ such that $E=\cup U_i$. Suppose for each $\overline{U_i}$ I have a strong Markov process $X_i$ in $\overline{U_i}$ killed at $\overline{U_i}-U_i$ and that started at $x\in U_i \cap U_j$, $X_i$ and $X_j$ are the same up until the first time they leave $U_i \cap U_j$. Is it possible to "glue" these $X_i$'s together (analogous to the example above) to get a strong Markov process on all of $E$?

I think I can make sense of my example by looking at the infinitesimal generator for the process and observing that it is "nice" and therefore is the generator of a strong Markov process. Perhaps I can use the same sort of idea in general if the $X_i$ are "nice" (that is if the $X_i$ have "nice" generators operating on $C_0(U_i)$, I can use them to construct a nice generator on $C_0(E)$ and then use general theory to say there is a process with this generator), but I'm wondering if there is anything in the literature on this sort of construction.

EDIT: I slightly changed my example to try to emphasize that I don't want to a priori assume that I know anything about the process I get in the end.