Smartphone maker HTC which Apple has sued twice, says the patents Apple has accused it of infringing are invalid, according to the “Groklaw” web site (http://macosg.me/2/s4).

The article says that HTC denies infringing the patents, but also says, as a first affirmative defense, that four of the patents are invalid for “failure to comply with one or more of the conditions for patentability set forth in Title 35 of the United States Code, including, but not limited to, utility, novelty, non-obviousness, enablement, written description and definiteness in accordance with 35 U.S.C. §§ 101, 102, 103, 112, and/or 116, or are invalid pursuant to the judicial doctrine barring double-patenting.”

“Groklaw” says HTC also claims prior art, marking, laches and marking defenses, and it says it has license agreements with third party suppliers to do what they do the things Apple is suing them over. It asks the court to declare the patents invalid.

In June Apple expanded its lawsuit against HTC. In a complaint filed in the U.S. District Court for the District of Delaware, Apple accused HTC of infringing two additional patents and re-asserted its allegations of infringement of two others.

Apple filed in March against HTC for infringing on 20 Apple patents related to the iPhone’s user interface, underlying architecture and hardware. The lawsuit was filed concurrently with the U.S. International Trade Commission (ITC) and in U.S. District Court in Delaware.

As many as 10 of those violations involve the Nexus One, Apple said in a complaint submitted to the ITC. The Delaware lawsuit, however, didn’t specify the HTC-made phones that allegedly violated Apple’s patents.

In May HTC, in turn, filed a complaint with the United States International Trade Commission (ITC) to halt the importation and sale of the iPhone, iPad and iPod in the U.S. HTC says Apple is infringing on five of its patents.