Let $X$ be a closed subvariety of $\mathbf P^{n}_{k}$ which is nonsingular in codimension one. Let $Y$ be a subvariety of $X$ of codimension one, let $\eta$ be its generic point.
First question: is the ideal $m_{\eta}$ of the local ring $O_{X,\eta}$ principal?
Now, let $f$ be a rational function. I'm interested in evaluating $\nu_{Y}(f)$.
Second question (if the answer to the first one is yes): is $\nu_{Y}(f)$ the integer $n$ such that $f=hg^{n}$, where $(g)=m_{\eta}$ and $h$ is invertible in $O_{X,\eta}$?
Thanks!