Re: Thoughts on the way to school...

[email protected] (Klemens Meyer) Sat, 11 Oct 2003 18:56:03 +0200
Newsgroups gmane.comp.tools.memaid.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I am back :-))

On Friday 10 October 2003 01:53, David Calinski wrote:

> Ok, I made a simple script (xmlexport) in Perl (attached to this email),
> may have bugs as I am not a Perl programmer, but it WorksForMe[tm].

> KMemAid already support some html formatting, AFAIK.

That is a problem. The richtext tags in kmemaid are simple html tags.
The problem now is the form: "<h1> ... </h1>" That leads to confusion
with the xml tags. So the question and answer data has to be protected
inside cdata sections: "<![CDATA[<h1> ... </h1>]]>"

Another thing about the format you chose: You put all the numerical data
into their own xml section. That is IMHO not necessary. That data is
better put as parameter. I think that makes the xml file not so bloated.

And then we need a DTD for the xml file. Without we have well formed but
not valid xml. Not to mention the header with the version specification
and the like.

- --- 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.


Klemens
- -- 
Quote of the day:
"I'd love to go out with you, but I'm doing door-to-door collecting for
static cling."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/iDYmwG0rxVkueMYRAo4wAJwJJVb8YMx4adiJGtb3YQz5LUJZ6QCghtdp
8K8hH5PecgI8k1LSMfgsve8=
=P1Jm
-----END PGP SIGNATURE-----



-------------------------------------------------------
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