Re: Thoughts on the way to school...

Bruno Vernier <[email protected]> Sat, 11 Oct 2003 12:47:02 -0700
Newsgroups gmane.comp.tools.memaid.devel
Message-ID <[email protected]>
On Sat, Oct 11, 2003 at 06:56:03PM +0200, Klemens Meyer wrote:

> - --- XML example start ---
> <?XML version="1.0" ?>
> <!DOCTYPE memaid_data [
>  <!ELEMENT memaid_data (element)>
>  <!ELEMENT element (question, answer)>
>  <!ELEMENT question (#PCDATA)>
>  <!ELEMENT answer (#PCDATA)>
>  <!ATTLIST memaid_data time_of_start cdata "">
>  <!ATTLIST element time_to_repeat cdata ""
>                    real_last_interval cdata ""
>                    last_interval cdata ""
>                    interval cdata ""
>                    repetitions cdata ""
>                    grade cdata "">
> ]>
> <memaid_data time_of_start="1">
>  <element time_to_repeat="3" real_last_interval="4" last_interval="5"
>  interval="6" repetitions="7" grade="8">
>   <question>
>    <!CDATA[<h1>This is the question</h1>]]>
>   </question>
>   <answer>
>    <!CDATA[<h1>This is the Answer</h1>]]>
>   </answer>
>  </element>
>  <element>
>   ...
>  </element>
> </data>
> - --- XML example end ---
> 
> 
> Well, I hope I got the DTD right. Anybody with XML experiences should
> correct my propopsal, please.

Hello Klemens,

I have some XML experience and this looks well-formed to me except for the
syntax for CDATA is <![CDATA[<h1>this is the question</h1>]]>
(you missed a left square bracket)

Personally, I favor shorter element and attribute names (since XML data is
often sent over long distances ... the less bloat the better)

I particularly agree with your converting the numeric data to attributes and
protecting the question and answers in CDATA[]

for a quick tutorial/reference on CDATA, see http://www.w3schools.com/xml/xml_cdata.asp

Bruno


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php