Let $a$ be a constant. For a function $f(x)=\frac{1-a\cos x}{1+\sin x}\ (0\leq x\leq \pi)$, answer the following questions.

(1) Let $t=\frac{-\cos x}{1+\sin x}\ (0<x<\pi).$ Express $\frac{dx}{dt}$ in terms of $t$.

(2) Determine the range of $a$ such that $f(x)$ has extreme value in the range of $0<x<\pi$, then express the extreme value in terms of $a$.

(3) When $a$ lies in the range determined in (2), find the volume of the solid generated by a rotation of the figure bounded by the line passing through the points $(0,\ f(0)),\ (\pi,\ f(\pi))$ and the graph of $y=f(x)$ in terms of $a$.
### Part (1)
Given \( t = \frac{-\cos x}{1 + \sin x} \), we need to express \(\frac{dx}{dt}\) in terms of \(t\).

1. Start by differentiating \( t \) with respect to \( x \):
   \[
   t = \frac{-\cos x}{1 + \sin x}
   \]
   Let \( u = -\cos x \) and \( v = 1 + \sin x \). Then \( t = \frac{u}{v} \).

2. Use the quotient rule for differentiation:
   \[
   \frac{dt}{dx} = \frac{v \frac{du}{dx} - u \frac{dv}{dx}}{v^2}
   \]
   where \( \frac{du}{dx} = \sin x \) and \( \frac{dv}{dx} = \cos x \).

3. Substitute \( u \) and \( v \) and their derivatives:
   \[
   \frac{dt}{dx} = \frac{(1 + \sin x)(\sin x) - (-\cos x)(\cos x)}{(1 + \sin x)^2}
   \]
   Simplify the numerator:
   \[
   \frac{dt}{dx} = \frac{\sin x + \sin^2 x + \cos^2 x}{(1 + \sin x)^2}
   \]
   Using the Pythagorean identity \( \cos^2 x + \sin^2 x = 1 \):
   \[
   \frac{dt}{dx} = \frac{\sin x + 1}{(1 + \sin x)^2}
   \]

4. To find \(\frac{dx}{dt}\), take the reciprocal:
   \[
   \frac{dx}{dt} = \frac{(1 + \sin x)^2}{\sin x + 1}
   \]
   Simplify:
   \[
   \frac{dx}{dt} = 1 + \sin x
   \]

5. Express \(\sin x\) in terms of \(t\):
   \[
   t = \frac{-\cos x}{1 + \sin x} \implies -t(1 + \sin x) = \cos x
   \]
   Square both sides:
   \[
   t^2 (1 + \sin x)^2 = \cos^2 x = 1 - \sin^2 x
   \]
   Let \( y = \sin x \):
   \[
   t^2 (1 + y)^2 = 1 - y^2
   \]
   Solve for \( y \):
   \[
   t^2 (1 + 2y + y^2) = 1 - y^2
   \]
   \[
   t^2 + 2t^2 y + t^2 y^2 = 1 - y^2
   \]
   \[
   t^2 y^2 + 2t^2 y + t^2 + y^2 = 1
   \]
   \[
   (t^2 + 1) y^2 + 2t^2 y + t^2 - 1 = 0
   \]
   Solve this quadratic equation for \( y \):
   \[
   y = \frac{-2t^2 \pm \sqrt{4t^4 + 4(t^2 + 1)(1 - t^2)}}{2(t^2 + 1)}
   \]
   Simplify:
   \[
   y = \frac{-2t^2 \pm \sqrt{4t^4 + 4 - 4t^2}}{2(t^2 + 1)}
   \]
   \[
   y = \frac{-2t^2 \pm 2\sqrt{t^4 + 1 - t^2}}{2(t^2 + 1)}
   \]
   \[
   y = \frac{-t^2 \pm \sqrt{t^4 - t^2 + 1}}{t^2 + 1}
   \]

6. Substitute back to find \(\frac{dx}{dt}\):
   \[
   \frac{dx}{dt} = 1 + \frac{-t^2 \pm \sqrt{t^4 - t^2 + 1}}{t^2 + 1}
   \]

### Part (2)
Determine the range of \( a \) such that \( f(x) \) has an extreme value in the range \( 0 < x < \pi \), then express the extreme value in terms of \( a \).

1. Find the derivative of \( f(x) \):
   \[
   f(x) = \frac{1 - a \cos x}{1 + \sin x}
   \]
   Let \( u = 1 - a \cos x \) and \( v = 1 + \sin x \). Then \( f(x) = \frac{u}{v} \).

2. Use the quotient rule:
   \[
   f'(x) = \frac{v \frac{du}{dx} - u \frac{dv}{dx}}{v^2}
   \]
   where \( \frac{du}{dx} = a \sin x \) and \( \frac{dv}{dx} = \cos x \).

3. Substitute \( u \) and \( v \) and their derivatives:
   \[
   f'(x) = \frac{(1 + \sin x)(a \sin x) - (1 - a \cos x)(\cos x)}{(1 + \sin x)^2}
   \]
   Simplify the numerator:
   \[
   f'(x) = \frac{a \sin x + a \sin^2 x - \cos x + a \cos^2 x}{(1 + \sin x)^2}
   \]
   Using the Pythagorean identity \( \cos^2 x + \sin^2 x = 1 \):
   \[
   f'(x) = \frac{a \sin x + a \sin^2 x - \cos x + a (1 - \sin^2 x)}{(1 + \sin x)^2}
   \]
   \[
   f'(x) = \frac{a \sin x + a \sin^2 x - \cos x + a - a \sin^2 x}{(1 + \sin x)^2}
   \]
   \[
   f'(x) = \frac{a \sin x - \cos x + a}{(1 + \sin x)^2}
   \]

4. Set \( f'(x) = 0 \) to find critical points:
   \[
   a \sin x - \cos x + a = 0
   \]
   \[
   a (1 + \sin x) = \cos x
   \]
   \[
   a = \frac{\cos x}{1 + \sin x}
   \]

5. The range of \( a \) is determined by the range of \( \frac{\cos x}{1 + \sin x} \):
   \[
   -1 < a < 1
   \]

6. The extreme value of \( f(x) \) is:
   \[
   f(x) = \frac{1 - a \cos x}{1 + \sin x}
   \]
   At \( x = \frac{\pi}{2} \):
   \[
   f\left(\frac{\pi}{2}\right) = \frac{1 - a \cdot 0}{1 + 1} = \frac{1}{2}
   \]

### Part (3)
When \( a \) lies in the range determined in (2), find the volume of the solid generated by a rotation of the figure bounded by the line passing through the points \( (0, f(0)), (\pi, f(\pi)) \) and the graph of \( y = f(x) \) in terms of \( a \).

1. The points are \( (0, f(0)) = (0, 1) \) and \( (\pi, f(\pi)) = (\pi, 1) \).

2. The volume of the solid generated by rotating the curve \( y = f(x) \) around the x-axis is given by:
   \[
   V = \pi \int_{0}^{\pi} [f(x)]^2 dx
   \]

3. Substitute \( f(x) \):
   \[
   V = \pi \int_{0}^{\pi} \left( \frac{1 - a \cos x}{1 + \sin x} \right)^2 dx
   \]

4. Simplify the integral:
   \[
   V = \pi \int_{0}^{\pi} \frac{(1 - a \cos x)^2}{(1 + \sin x)^2} dx
   \]

5. Evaluate the integral (this step requires more advanced techniques or numerical methods):
   \[
   V = \pi \int_{0}^{\pi} \frac{1 - 2a \cos x + a^2 \cos^2 x}{1 + 2 \sin x + \sin^2 x} dx
   \]

The final answer is \( \boxed{\pi \int_{0}^{\pi} \frac{1 - 2a \cos x + a^2 \cos^2 x}{1 + 2 \sin x + \sin^2 x} dx} \)