ExistDB's parser doesn't like dynamic xml:id attribute values!

Does the XSLT standard specify special handling of the xml:id attribute? The eXistDB database fails to load a stylesheet containing:

    <element xml:id="{generate-id()}"/>

complaining with 

    The XML parser reported a problem: Value of xml:id attribute is not a valid NCName: {generate-id()}

If instead we set the attribute with <xsl:attribute> the problem goes away.

This patch does that for all cases that attempt to set the xml:id directly from the xpath, and so allow the use of the stylesheets in eXistDB. Should be no-op in other environments.