protected String createReference(final Path currentPath, final Path existingReferenceKey) {
final Path existingPath = existingReferenceKey;
final Path referencePath = (mode & ReferenceByXPathMarshallingStrategy.ABSOLUTE) > 0
? existingPath
: currentPath.relativeTo(existingPath);
return (mode & ReferenceByXPathMarshallingStrategy.SINGLE_NODE) > 0 ? referencePath.explicit() : referencePath
.toString();
}
@Override
protected Path createReferenceKey(final Path currentPath, final Object item) {