NORWALK — Barnes & Noble has filed a lawsuit against Xerox Corp. as part of a patent dispute. The bookseller is suing to head off lawsuits from Xerox after the printer company made claims that barnesandnoble.com was in violation of four of its patents, which Barnes & Noble denies. The U.S. subsidiary of French mobile-phone maker Alcatel is also being sued by the Barnes & Noble after making similar claims that the book company’s e-book platform, the Nook, is in violation of seven Alcatel patents. Both companies are demanding that patent royalties be paid by the bookseller for the infringements. Barnes and Noble denies the two companies’ claims and is asking the court to rule in its favor.