Declared XML Namespace(s) - is this corrct?
Hi. First post here. First of all I've been looking for an active forum to post this question on thought I'd try here.
I have to create an XML file that stores music and video recordings. Some of the music and video recordings have the same attributes such as title, category etc so I have created a namespace(s) to distinguish between them.
I thought what I had done was correct till I started to work on the Schema to validate the document.
This is the working version so far: (only one music/video recording shown, more in actual file)
<library>
<item xmlns="http://www.w3.org/music" recId="2040" imageName="nin_prettyhatemachine.gif" numTracks="10">
<artist>Nine Inch Nails</artist>
<title>Pretty Hate Machine</title>
<category id="5">Rock</category>
<price>13.99</price>
<songs>
<track id="468" duration="230">Head Like A Hole</track>
<track id="469" duration="211">Terrible Lie</track>
<track id="470" duration="180">Down In It</track>
<track id="471" duration="255">Sanctified</track>
<track id="472" duration="244">Something I Can Never Have</track>
<track id="473" duration="202">Kinda I Want To</track>
<track id="474" duration="205">Sin</track>
<track id="475" duration="180">That's What I Get</track>
<track id="476" duration="221">Only Time</track>
<track id="477" duration="250">Ring Finger</track>
</songs>
</item>
<item xmlns="http://www.w3.org/video" recId="3004" imageName="disco_godfather.gif" duration="5580">
<director>J. Robert Wagoner</director>
<title>Disco Godfather</title>
<category id="0">Action and Adventure</category>
<rating>R</rating>
<year>1993</year>
<price>23.99</price>
<actors>
<actor id="23" name="Rudy Ray Moore"></actor>
<actor id="24" name="Carol Speed"></actor>
<actor id="25" name="Jerry Jones"></actor>
<actor id="26" name="Lady Reed"></actor>
<actor id="27" name="Jimmy Lynch"></actor>
</actors>
</item>
</library>
I then thought that instead of <item xmlns="http://www.w3.org/video"
it should be ><music xmlns="http://www.w3.org/music" .. > for music
and <video xmlns="http://www.w3.org/video" .. > for video.
Clarification on which is the right way to do this would be appreciated, bearing in mind I have to create a Schema to validate this next.

