Promote apps in catalog to Templates

When adding CAMP specs to the catalog check if they describe an entity implementing Application and if so use a TEMPLATE instead of ENTITY item.
Why do these strings need newline separators? Does the test change if the XML is collapsed?