We use the boundary-path space of a finitely-aligned k-graph \Lambda to
construct a compactly-aligned product system X, and we show that the graph
algebra C^*(\Lambda) is isomorphic to the Cuntz-Nica-Pimsner algebra NO(X). In
this setting, we introduce the notion of a crossed product by a semigroup of
partial endomorphisms and partially-defined transfer operators by defining it
to be NO(X). We then compare this crossed product with other definitions in the
literature.Comment: Corrections made to Section 5.