You can't use an element inside an attribute, so XSLT has another mechanism for constructing attribute values, called an attribute value template or AVT:
<Form formtypid="123" formName="Book" formvalue="{expr}"/>
where expr is any XPath expression.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference