What does it mean the “principle of specialty” in trademarks?

It means that the trademarks scope of protection is referred only to those products/services that covers the trademark registration as well as the similar ones. In other words, it is possible that two identical trademarks coexist in the markert (and in the register) subject to both trademarks cover different products and/or services that will not mislead the consumers.