The photoresist composition containing a polymer having silicon atoms and sulfonium salt units as defined in claim 2, wherein said R4 is a radical selected from the group consisting of linear and branched C2 -C8 alkylene groups and a C5 -C8 cycloalkylene group.