Firstly, let's be clear that you are not including "nodes" in your attributes; what you want is to serialize an attribute that contains XML markup. We're talking at the lexical level, not the tree level, and nodes exist only at the tree level.
To generate this output, there are two challenges. Firstly, you need to construct a string containing the lexical XML, and then pass this string as the value of the attribute. Secondly, you need to prevent special characters in this string being escaped.
For the first problem, there are two approaches: you can invoke an external serialize() function that converts a tree to lexical XML as a string, such as saxon:serialize() if you are using Saxon, or you can write your own (which isn't difficult for simple cases, and it has already been done - David Carlisle has written a complete XML serializer in XSLT).
The second problem is tricky. The XSLT serialization spec (all versions) is adamant that the HTML serialization method should not escape "<" appearing in attribute values, but it has little or nothing to say about ">". Saxon escapes ">" as ">"
, ostensibly because this is required by older browsers (probably very old by now!), but I don't think this is required by the spec, and other processors may differ. Disable-output-escaping does not work for attribute values, so you may have to resort to constructing the entire element serialization by hand using disable-output-escaping. Alternatively, with XSLT 2.0 you can use character maps to force output of a ">" in an attribute value.
In your example code, you are using disable-output-escaping while writing the value of a variable. There's a yoyo history for this in the spec. An erratum to XSLT 1.0 (the so-called "sticky doe" erratum) said it was allowed, but this was reversed in XSLT 2.0, because it was incompatible with allowing full navigational access to result-tree-fragments held in variables. So the bottom line is that it may or may not work depending on the processor you use - but of course that's true of disable-output-escaping generally.
A completely different solution to this requirement might be to output something different - for example using chevrons in place of angle brackets - and then filter the serialized output through a textual filter that substitutes the relevant characters to the ones you actually want.