Re: Stations are primary

From: John Halleck (John.Halleck@utah.edu)
Date: Thu Mar 01 2001 - 18:16:21 CET


On Thu, 1 Mar 2001, Garry Petrie wrote:

> [...]
> I don't think we want to recommend editing CaveXML with a generic text editor. What does
> the XML rule say about newline characters? DOS, UNIX or MAC world? Probably says maintain
> whatever character was used by the file, but many text editors were never intended to be
> cross platform.

  What is says is that applications should be handed linefeed regardless of which one
  the data has, and it must handle all the normal sorts (mac, dos, unix), and is worded
  in a manner that record oriented systems have to invent the line feed.
  (I can give a specific reference if you want.)

  *rant*
  I 'd suggest that people discussing how we should handle cave
  data in XML should actually read the XML spec.
  I personally recomend the annotated version (by one of the
  authors of the spec) located at
      http://www.xml.com/axml/testaxml.htm
  since in includes discussions about WHY it is the way it is, and what
  the actual intent was in many cases.
  * end rant *

> I would say that CaveXML can be patched with a text editor, but do not try
> and write native XML off the top of your head.

  Why not? I use unix vi on XML documents all the time.
  It has always been my HTML editor of choice.

> [...]

> > I don't see a real need for the station id's to follow any particular
> > pattern, sequential numbers, globally unique identifiers etc., but of
> > course that is permitted, or they can be added as another set of names.
> > All that is *needed* is that ids be unique within one file. Stations in
> > other files could be handled by a station element that contains a
> > reference to the other file; within this file it would be referred to by
> > its local id.

> I like the idea of unique IDs within a file, for both shots and stations. Can we convince
> those cave data format in which names are context based (survex) users to adopt this idea?

  Let's also not confuse the concept of each station have a unique identifier with
  the concept of each station having an XML ID.

  Assuming
     <!ELEMENT station ...>
     <!ATTLIST station name CDATA>
     <!ATTLIST station unique NMTOKEN>
  we can have the first occurance of the point be
     <station name="A1" unique="p1">
  and later when the loops close we can have
     <station name="a1" unique="p1">
  down in that page. This is legal, and everywhere the point appears it
  has the same unique identifier
  HOWEVER, if unique is an ID then this is not legal. While a given ID can
  can be referenced from all over the place, it can only appear ONCE IN THE
  FILE, so the second occurance is above is not legal.

  You could, of course do something like:
     <!ELEMENT station ...>
     <!ATTLIST station name CDATA>
     <!ATTLIST station uniqueID ID #IMPLIED>
     <!ATTLIST station uniqueREF IDREF #IMPLIED>
  and recast the example as:
     <station name="A1" uniqueID="p1">
  and then when the station appears later in the data when we close the
  loop we would have:
     <station name="a1" uniqueREF="p1">
  but I personally thing this is ugly.
  I'd personally prefer that the unique item associated with a station or
  shot not be an XML ID.

> Garry Petrie
>



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