My only other question is whether this notation could be extended (if it doesn't allow it already) to include not just a schema but the data inside it. My guess is it would then look a bit like a data structure serialized into perl..
RELAX NG is just the grammar, right? It just describes the structure and content of an XML file. Putting data into it seems weird. Correct me if I'm wrong, I only started looking at RELAX NG over the past week or so.
And doing serialization in XML seems like overkill to me. We already have YAML if you want portable and human-readable serialization. But, of course, there is more than one way to do it.