The United States Patent and Trademark Office (USPTO)’s decision to uphold i4i’s patents for handling custom XML has eroded Microsoft’s defense against violating the patents, a legal expert says.

The patents deal with how XML can be used to bind document content to data stored in a customized schema. i4i, a Canadian document management company, was awarded the patents in 1998.

While i4i was once a little-known company, it played the role of a proverbial David against Microsoft, the software industry’s Goliath, using its patents to win victories against Microsoft in court. Consequently, Microsoft was prompted to change XML features in Office and was temporarily barred from selling it.

Microsoft initially filed to have the USPTO re-examine the patents in November 2008, arguing against their validity. The patents were upheld yesterday, instead.

Microsoft vows to forge on and is considering its legal options, including a petition to the Supreme Court, said Kevin Kutz, director of public affairs for Microsoft, in a statement.

However, Microsoft’s defense may be a long shot. “I think they win at the Federal Circuit and in the PTO; it makes these patents very hard to challenge on validity grounds,” said Mark A. Lemley, a professor of law at Stanford Law School and director of Stanford’s program in law, science and technology.

Last year, i4i filed suit against Microsoft in the U.S. District Court, Eastern District of Texas for using the technology in Office’s Custom XML feature. i4i won the judgment in August 2009, and the court issued an injunction against the sale of Microsoft Office 2003 and 2007, prompting Microsoft to release a patch to strip the offending functionality from its products.

The patch removed Word’s ability to read Custom XML elements contained within DOCX, DOCM or XML files.