TITLE: Real analytic set on a compact domain, no zeros on the boundary - isolated points only?
QUESTION [6 upvotes]: I have a feeling that the following must be true, but I cannot figure out a proof.
I have two real analytic functions, $f$, $g$, both $[0,1]^2\rightarrow\mathbb{R}$.
I am interested in the set for which $f(x,y)=g(x,y)=0$. Specifically, I would like to prove that this set is zero-dimensional. I know the following about these functions:
For every $x_0 \in [0,1]$, $f(x_0,y)=0$ has a solution. 
There exists $\epsilon \in(0,0.5)$ so that $g(x_0,y)=0$ has solutions only for $x_0\in [\epsilon,1-\epsilon]$.
Conversely, for every $y_0 \in [0,1]$, $g(x,y_0)=0$ has a solution. 
There exists $\epsilon \in(0,0.5)$ so that $f(x,y_0)=0$ has solutions only for $y_0\in [\epsilon,1-\epsilon]$.
To put it into words, close to the boundary of the domain in $x$-direction, $f$ has zeros but $g$ does not. Close to the boundary in $y$-direction, $g$ has zeros but $f$ does not.
This of course implies all solutions to the system are in the interior.
My questions are:
a) Is the information sufficient to conclude that solutions to $f=g=0$ are isolated points, i.e. there cannot be higher dimensional zero sets for the system? How would one show this?
b) If it is false, what would be a counterexample?
c) If it is true, is it also true for higher dimensions, say 3 functions $f,g,h:[0,1]^3\rightarrow\mathbb{R}$ with
$f,g$ having zeros near and at $x=0,x=1$, but not $h$,
$f,h$ having zeros near and at $y=0,y=1$, but not $g$,
$g,h$ having zeros near and at $z=0,z=1$, but not $f$.
Again the zero set for the system must lay in the interior. Can it contain paths?
Any help is highly welcome.
edit: I'll try to add a bit of thought we've had here.
If the solution set does contain a path, this path can not be parallel to either the $x$- or $y$-axis - for then one could apply the identity theorem, and the restriction of both functions to that parallel would have to be the zero function. This contradicts either function not having a solution close to the boundaries this parallel intersects.
So then, if such a path exists, it must be possible locally to give a parametrization of one coordinate by the other, say $\bar x(y)$, with $f(\bar x(y),y)=g(\bar x(y),y)=0$ for $y$ in some open interval. But I fail to derive a contradiction from that and the assumptions quite yet. 
edit2: H. H. Rugh's answer and other users in the comments have pointed out how to construct counterexamples by taking any $f,g$ with the described properties and then multiplying both by some $h$ that has a 1-dimensional zero set in the interior. That was very helpful, since I realize now that the information described above is not sufficient to conclude what I wish to conclude (i.e. isolated zeros only). However, I am still convinced that it holds for the system I am interested in, but I obviously will have to rethink how to approach it.
Any hints regarding which properties might be helpful to establish that such a system allows only isolated solutions would be highly welcome.

REPLY [2 votes]: We assume that our (implicitly defined) curves have no singular points (the normal vector is never $0$). Then, at least locally, we may assume that our curves $C,D$ are in  parameterized forms $t\in [a,b]\mapsto f(t)\in\mathbb{R}^2,t\in [a,b]\mapsto g(t)\in\mathbb{R}^2$ ($f,g$ real analytic) and that they have no singular points ($f,g$ are immersions), that is, they are immersed curves (they may have multiple points but no cusps).
$\textbf{Proposition.}$ If $C,D$ have an infinite number of  intersection points, then they have in common a finite union of points and intervals -at least one- (image by $f$ or $g$ of a "true" subinterval of $[a,b]$).
The proof uses o-minimal theory;  a sketch of the proof (Peter Michor and ACL) can be found in 
https://mathoverflow.net/questions/121602/two-different-analytic-curves-cannot-intersect-in-infinitely-many-points
and details here
https://mathoverflow.net/questions/109705/real-functions-with-finitely-many-zeroes