TikZ: text along path as node

I'm using the decorations library to put bended text along a path. That works fine. However, I'd like to have the bended text as a node, so that I can later use it as a reference (for instance to draw a line to it). Is that possible? How do I define the nodes's name?

Here you have a MWE:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{decorations.text}
\usetikzlibrary{decorations.pathmorphing}

\begin{document}

\begin{tikzpicture}

\node at (0,0) (nodeA) {A};
\node at (2,2) (nodeB) {B};

\draw (nodeA) -- (nodeB);

\draw [decoration={text along path,
text={path text},text align={center}},decorate]  (nodeA) -- (nodeB);

\node at (0,2) (nodeC) {C};
\draw [->] (nodeC) -- (.8,1.2);

\end{tikzpicture}

\end{document}


In the last bit, where a line is drawn from (nodeC) to the "path text", I had to use a coordinate, but I'd like to be able to use the a node reference.

The picture looks like this:

-
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  Kurt Oct 10 '12 at 14:48
Unfortunately, text decorations seperate the text into individual letters and put them into distinct boxes. So if you can provide an MWE then we can try to see if we can squeeze in a coordinate or a node. –  percusse Oct 10 '12 at 16:22
@percusse: I've edited my question adding a MWE. I didn't manage to put the code in a comment (I'm new in this forum). –  Didac Busquets Oct 11 '12 at 9:13
Editing the question is always better than putting the code in a comment - you did the right thing. –  Loop Space Oct 11 '12 at 9:14
What shape would you like the node to be? Making it follow the shape of the text would be quite hard to do. Putting coordinates at each letter would be possible, followed by fitting a rectangular node to the whole lot. An alternative would be to use the path as a reference. –  Loop Space Oct 11 '12 at 9:17

If you just want the text rotated and sloped along the path, you can use the sloped option to the node, and don't need to use a decoration.

Code:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}

\node at (0,0) (nodeA) {A};
\node at (2,2) (nodeB) {B};

\draw (nodeA) -- (nodeB);

\draw (nodeA) -- (nodeB) node [midway, above, sloped] (TextNode) {path text};
\node at (0,2) (nodeC) {C};
\draw [->] (nodeC) -- (TextNode);

\end{tikzpicture}
\end{document}

-
That's exactly what I needed... and much easier the using decorations. –  Didac Busquets Oct 11 '12 at 10:52