public static void Serialize <T>(XmlWriter output, T value, string referenceRelocationPath)
        {
            var serializer = new IntermediateSerializer();
            var writer     = new IntermediateWriter(serializer, output, referenceRelocationPath);

            output.WriteStartElement("XnaContent");

            serializer._namespaceAliasHelper.WriteNamespaces(output, value);

            // Write the asset.
            var format = new ContentSerializerAttribute {
                ElementName = "Asset"
            };

            writer.WriteObject <object>(value, format);

            // Process the shared resources and external references.
            writer.WriteSharedResources();
            writer.WriteExternalReferences();

            // Close the XnaContent element.
            output.WriteEndElement();
        }