Re: Stations are primary

From: Ralph Hartley (hartley@aic.nrl.navy.mil)
Date: Wed Mar 07 2001 - 15:46:25 CET


Richard Knapp wrote:

> me:

>> <shot>
>> <from> <station ID="ABX1" name="ABX1"/> </from>
>> <to> <station ID="ABX2" name="ABX2"/> </to>
>> </shot>
>> <shot>
>> <from statonref="ABX2"/> <!-- stationref is an IDREF --!>
>> <to> <station ID="ABX3" name="ABX3"/> </to>
>> </shot>
>
>
> There is also the issue of control points. If I do a precision survey
> and have solid coordinates on points in the cave, where would they go?
> Technically, they could be part of a survey but that survey doesn't
> have any shot data. So it might be something like...
>
> <survey>
> <stations>
> <station name="CACA001" X="0" Y="0" Z="0"/>
> <station name="CACA002" X="10" Y="5" Z="-44"/>
> <station name="CACA003" X="55" Y="-6.4" Z="-55"/>
> </stations>
> </survey>

This, or something like it using a separate "Location" element, would be
OK.

> However, are there links between the stations? Surely there is a way
> to connect the points. That was how the data was "discovered". Hmmmm..

But you may not know how the stations were discovered. More to the
point, you may not be willing to TELL the person you are sending the
file to. Your fragment would be a correct way to send "processed" data.
Often people are willing to share that, but not the "raw" data. This
should be allowed.

> In your example above, the stations are defined within the shot. What
> if they were pulled out of that scope and put just into the survey scope?
>
> How about this. A survey is a collection of stations and shots as in
> the two line format...
>
> <survey>
> <station name="A1" ID="00001"/>
> <shot>
> <from IDREF="00001"/>
> <to IDREF="00002"/>
> <azi value="33.3"/>
> <distance value="10.2"/>
> <inclination value="-3.3"/>
> </shot>
> <station name="A2" ID="00002"/>
> </survey>

Also perfectly legal.

>
>
> What I don't know (getting closer to starting the XML book)

Do it.

> is if an IDREF can be put in front of a station.

It can. The spec says it needs to be unique. It doesn't say the order
matters, so it doesn't.

> On the other hand, element order must be preserved (from XML spec,
> attributes maybe). If the 'from' and 'to' were removed you would
> basically have the two line format.
> <survey>
> <station name="A1" ID="00001"/>
> <shot>
> <azi value="33.3"/>
> <distance value="10.2"/>
> <inclination value="-3.3"/>
> </shot>
> <station name="A2" ID="00002"/>
> </survey>

I don't like this, but I don't know that it violates any of my
principles. The XML spec says nothing about the importance of ordering
between elements of the same type. We could define it to be significant,
assuming existing XML tools always preserve the order (Does anyone know
if they do?). I would prefer to define CaveXML so that the order is NOT
considered meaningful, only the nesting structure is. The problem is
that different order are useful for different purposes, so I would like
to be able to reorder them for the task at hand.

> FWIW, you can bring this thread back to the list.

OK

Ralph Hartley



This archive was generated by hypermail 2b30 : Mon Apr 02 2001 - 18:00:00 CEST