The project I'm working on is about a role-playing game (a classic paper&dice one), which requires lots of online material (spell lists, object lists, characters sheets and more). I don't want to go further into specifics, so I'll use the most generic but descriptive examples possible: Let's assume I have a file like that (it's very simplified, but it'll do): spell.xml <?xml version="1.0" encoding="utf-8"?> <spell id="fireball"> <mana>10</mana> <level>3</level> <effect>blah blah and some additional blah... my question is NOT about the effects of a fireball :P</effect> </spell>
And now consider this other file: spellbook.xml <?xml version="1.0" encoding="utf-8"?> <spellbook> <spell id="counterspell"> <mana>1</mana> <level>10</level> <effect>Some blah blah blah, of course!</effect> </spell> <spell src="spell.xml"/> </spellbook>
That is what I want to do: 1) Create a single XML Schema (XSD) file that defines both the spell and the spellbook element (up to this point, I guess I've done it); and associate each xml file to the correct part of the XSD; so I don't need to define the spell object and then define it as a component of a spellbook. 2) Let the XSD (or the validator software) know that the src attribute means the content of the object is in another file (look at the line <spell src="spell.xml"/> ) I might use any alternative to the src attribute, and I'm even considering the use of xlink:href, but that's not the point. Does somebody know how to do this, or where can I find documentation about this use of schemas?