List<ReferenceReplacer> replacers = new ArrayList<ReferenceReplacer>();
replacers.add(new ChapterAndSectionReferenceReplacer());
replacers.add(new ImageReferenceReplacer());
replacers.add(new CodeReferenceReplacer());
replacers.add(new BibliographyReferenceReplacer());
ReferenceParser referenceParser = new ReferenceParser(replacers);
bookContent = new StringBuffer(referenceParser.replaceReferences(bookContent.toString()));
return bookContent;