homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

Trouble writting Schemas for my app
Trying to define many doctypes in a single XSD

10+ Year Member

Msg#: 332 posted 3:09 pm on May 5, 2006 (gmt 0)

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):
<?xml version="1.0" encoding="utf-8"?>
<spell id="fireball">
<effect>blah blah and some additional blah... my question is NOT about the effects of a fireball :P</effect>

And now consider this other file:
<?xml version="1.0" encoding="utf-8"?>
<spell id="counterspell">
<effect>Some blah blah blah, of course!</effect>
<spell src="spell.xml"/>

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?



Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved