Thanks a lot!!
Just a few questions, does the modifiers mean the same thing as i regexps (?=one or zero, *=zero or more, +=one or more)?
Also, is "#IMPLIED" the same thing as "optional"? :)


Should the DTD-file have a special header?

// Per Wigren


Eirik Meland wrote:


Per Wigren <[EMAIL PROTECTED]> writes:



This is release candidate 2. Please have a look and come up with ideas!
I don't know much about DTDs and XSLT so please help me write one
based on the format of this XML! :)



A quick DTD proposal:


<!--                    freevo                                     -->
<!ELEMENT  freevo       (webradio*)                                  >

<!--                    webradio                                   -->
<!ELEMENT  webradio     (station+)                                   >

<!--                    station                                    -->
<!ELEMENT  station      (module?, info, streams)                     >
<!ATTLIST  station
            name       CDATA                              #REQUIRED
            type       CDATA                              #IMPLIED  >

<!--                    module                                     -->
<!ELEMENT  module       (param+)                                     >
<!ATTLIST  module
            name       CDATA                              #REQUIRED >

<!--                    param                                      -->
<!ELEMENT  param        (#PCDATA)                                    >
<!ATTLIST  param
            name       CDATA                              #REQUIRED >

<!--                    info                                       -->
<!ELEMENT  info         (desc*, genre*, lang?, homepage?, location?) >

<!--                    desc                                       -->
<!ELEMENT  desc         (#PCDATA)                                    >
<!ATTLIST  desc
            lang       CDATA                              #REQUIRED >

<!--                    genre                                      -->
<!ELEMENT  genre        (#PCDATA)                                    >

<!--                    homepage                                   -->
<!ELEMENT  homepage     (#PCDATA)                                    >

<!--                    location                                   -->
<!ELEMENT  location     (#PCDATA)                                    >

<!--                    streams                                    -->
<!ELEMENT  streams      (stream+)                                    >

<!--                    stream                                     -->
<!ELEMENT  stream       (url)                                        >
<!ATTLIST  stream
            codec      (MP3|WMA)                          #REQUIRED
            kbps       CDATA                              #IMPLIED
            br         CDATA                              #IMPLIED
            ch         CDATA                              #IMPLIED  >

<!--                    url                                        -->
<!ELEMENT  url          (include?, exclude?, start?)                 >
<!ATTLIST  url
            type       (media | asx | m3u | pls)        #REQUIRED
            href       CDATA                              #REQUIRED >

<!--                    include                                    -->
<!ELEMENT  include      (#PCDATA)                                    >

<!--                    exclude                                    -->
<!ELEMENT  exclude      (#PCDATA)                                    >

<!--                    start                                      -->
<!ELEMENT  start        (#PCDATA)                                    >


The definition of the freevo-tag is ofcourse simplified..


I'm not sure witch attribute should be required and which should be
optional (implied), and I guess I have been to kind on that :-)

This DTD requires a strict order. It is possible to avoid it, but
choices aren't always a good thing...







-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to