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

Re: Help with XML - Dr Geo



hilaire@seul.org wrote:
> 
> 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 ?

Probably yes
If I were you, Iwould try to define one tag <point> with attributes such
as boolean "free" and som optional ones
> 
> The 2nd things. Is it valid, in the middle definition, to have twice the
> point attribut ? 

I think so
The same for all geometric figures
I suppose you should not define tags "triangle" and "square" but a more
general "figure" one
Yet I'm awaiting Bruno's point of view

>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)" />

<intersection label="C" figure="X" figure="Y">
	<figure label="X" category="line" point="M" point="N">
	etc...

About syntax I'm unsure but at least the idea is there

-- 
Odile Bénassy,
fonctionnaire, Orléans, France
"obenassy@magic.fr"
"http://perso.magic.fr/obenassy"