[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with XML - Dr Geo




Well, i'm preparing my holidays homework with XML and Dr Geo. At this
point I need some advices about XML.

How to choose ths tags for Dr Geo ?

Here are examples - valid ? - to define points :
 
 <freepoint label="A" x="1.3" y="10" />
 <freepoint label="B" x="13" y="10" />
 <middle label="I" point="A" point="B"/>

The 1st things I don't like is I need to define different tags for each
kind of point (and there is a lot) althought this is always point I
define. Do I have the choice ?


The 2nd things. Is it valid, in the middle definition, to have twice the
point attribut ? Or should I write somethings like :

 <middle label="I" point1="A" point2="B"/>

This appear to be more easy to parse this with libxml but may be less
readble.

The situation is even worst with intersection point:
Here the intersection of line & cercle ; segment & half-line :

<intersection label="A" line="(MN)" circle="(C1)" k="1" />
<intersection label="B" segment="[MN]" halfline="[OP)" />

This really look like a nightmare to parse wtih libxml as there is 10th
 of intersection point.

Alternatively I could make a horrible things like this :

<intersection_line_circle label="A" line="(MN)" circle="(C1)" k="1" />
<intersection_segment_halfline label="B" segment="[MN]" halfline="[OP)" />

Horrible for the users but easy to parse.

Any ideas, suggestion ?

PS : Bruno, I've tried to contact you without success


Hilaire Fernandes 
Dr Geo project http://www.drgeo.seul.org