Following the post How to enable smart references when using xr-hyper package for producing multi-volume book? I tried to elaborate required solution using zref package as was suggested by @Andrew Swann. Unfortunatly, I ran into another problem which seems to be a bug in zref. So I decided to post the problem description here. I am not sure if is it a proper place for posting such a question but Heiko Oberdiek, the author of zref did not answer to my email.
As suggested by @Andrew Swann, I tried to provide cross-references between 2 volumes of a multivolume book using Heiko's package zref. I addition, I introduced a property chaptervalue in order to provide smart references, which hide a chapter part of an equation number in case when the equation goes from the same chapter where it is referred from. Here is MWE. It contains 3 files.
Common code is saved in test-zref-common.tex:
% Load packages abd declare external docs.
\usepackage[user,xr]{zref}
\ifnum\Volume=1
% comment the line below to avoid errors
\zexternaldocument{test-zref-2}% <============
\makeatletter
\zref@ifpropundefined{volume}{
\zref@newprop{volume}{\Volume}
\zref@newprop{chaptervalue}{\the\value{chapter}}
}{}
\zref@localaddprops{main}{volume,chaptervalue}
\makeatother
\else
\zexternaldocument{test-zref-1}
\makeatletter
\zref@ifpropundefined{volume}{
\zref@newprop{volume}{\Volume}
\zref@newprop{chaptervalue}{\the\value{chapter}}
}{}
\zref@localaddprops{main}{volume,chaptervalue}
\makeatother
\fi
% Reset default equation numbering
\usepackage{amsmath}
\numberwithin{equation}{chapter}
\renewcommand{\theequation}{\arabic{equation}}
% Define \sref and \seqref macros for smart cross-references of equations
\makeatletter
\newcommand\ifcurrentchapter[3]{%
\def\temp@a{\number\value{chapter}}%
\def\temp@b{\zref@extract{#1}{chaptervalue}}%
\if\temp@a\temp@b%
#2%
\else%
#3%
\fi%
}
\newcommand{\sref}[1]{\hbox{\ifcurrentchapter{#1}{}{\zref[chaptervalue]{#1}.}\zref{#1}}}
\newcommand{\seqref}[1]{(\sref{#1})}
\makeatother
% Define a macro to print test text
\newcommand{\testtext}{
Compare \number\value{chapter} with \zref[chaptervalue]{ch:1}. Equal: \ifcurrentchapter{ch:1}{Yes}{No}
\par\noindent
Compare \number\value{chapter} with \zref[chaptervalue]{ch:2}. Equal: \ifcurrentchapter{ch:2}{Yes}{No}
\par\noindent
Compare \number\value{chapter} with \zref[chaptervalue]{ch:17}. Equal: \ifcurrentchapter{ch:17}{Yes}{No}
\par\noindent
Compare \number\value{chapter} with \zref[chaptervalue]{ch:18}. Equal: \ifcurrentchapter{ch:18}{Yes}{No}
}
The common file is read in by Volume 1 (test-zref-1.tex)
\documentclass[oneside]{book}
\newcommand{\Volume}{1}
\input{test-zref-common}
\begin{document}
\chapter{1 in Volume 1}
\label{ch:1}\zlabel{ch:1}
\testtext
\begin{equation}
eq1
\label{1.1}\zlabel{1.1}
\end{equation}
\begin{equation}
eq2
\label{1.2}\zlabel{1.2}
\end{equation}
\seqref{1.1}, \seqref{1.2}; \seqref{2.1}, \seqref{2.2}.
\seqref{17.1}, \seqref{17.2}; \seqref{18.1}, \seqref{18.2}.
\chapter{2 in Volume 2}
\label{ch:2}\zlabel{ch:2}
\testtext
\begin{equation}
eq3
\label{2.1}\zlabel{2.1}
\end{equation}
\begin{equation}
eq4
\label{2.2}\zlabel{2.2}
\end{equation}
\seqref{1.1}, \seqref{1.2}; \seqref{2.1}, \seqref{2.2}.
\seqref{17.1}, \seqref{17.2}; \seqref{18.1}, \seqref{18.2}.
\end{document}
and by Volume 2 (test-zref-1.tex):
%\documentclass{scrbook}
\documentclass[oneside]{book}
\newcommand{\Volume}{2}
\setcounter{chapter}{16}
\input{test-zref-common}
\begin{document}
\chapter{1 in Volume 2}
\label{ch:17}\zlabel{ch:17}
\testtext
\begin{equation}
eq1
\label{17.1}\zlabel{17.1}
\end{equation}
\begin{equation}
eq2
\label{17.2}\zlabel{17.2}
\end{equation}
\seqref{1.1}, \seqref{1.2}; \seqref{2.1}, \seqref{2.2}.
\seqref{17.1}, \seqref{17.2}; \seqref{18.1}, \seqref{18.2}.
\chapter{2 in Volume 2}
\label{ch:18}\zlabel{ch:18}
\testtext
\begin{equation}
eq3
\label{18.1}\zlabel{18.1}
\end{equation}
\begin{equation}
eq4
\label{18.2}\zlabel{18.2}
\end{equation}
\seqref{1.1}, \seqref{1.2}; \seqref{2.1}, \seqref{2.2}.
\seqref{17.1}, \seqref{17.2}; \seqref{18.1}, \seqref{18.2}.
\end{document}
It works fine if I refer to Volume #1 from Volume #2 (ie. when the line
\zexternaldocument{test-zref-2}
is removed from test-zref-common.tex). However it fails when I am trying to refer to both volumes, to Volume #1 from Volume #2 and to Volume #2 from Volume #1. zref complains that the chaptervalue property has been already defined. Attached files demonstrate this problem.
Is a bug in zref or a bug in MWE?

! Missing number, treated as zero.) So it will hardly be impossble to compile a big document if the number of errors exceeds 100. That's why I used\if\temp@a=\temp@binstead of\ifnum\temp@a=\temp@b. Can you suggest a better solution? – Igor Kotelnikov Jan 06 '14 at 07:25\ifnum. Note\if1717compares1with7, which is not want you want. If you are prepared to loadetoolbox, then you could just write\ifcurrentchapteras\ifdefequal{\value{chapter}}{\zref@extract{#1}{chaptervalue}}{#2}{#3}– Andrew Swann Jan 06 '14 at 10:00\if\temp@a\relax\else\if\temp@b\relax\else \ifnum\temp@a=\temp@b%) my XeTeX compiler outputs unexpected Greek capital omega at first run, so I finally choose solution described in 2nd answer. – Igor Kotelnikov Jan 07 '14 at 11:56\if\relex\temp@b...not\if\temp@b\relax.... In any case, there is\zref@extractdefaultand\zref@def@extractdefaultone could have used. – Andrew Swann Jan 07 '14 at 13:18