Frederic,
On 2005 Jun 3 , at 11.30, Frederic V. "Rick" Hessman wrote:
> You're wrong about XML attributes being "opaque" or "anonymous": they
> have a clearly defined
> base/type.
They have a type in XSchema, yes, but they're opaque in XML. OK, it's slightly more complicated than that, since as well as CDATA, attribute values can be ID, IDREF, and so on, or enumerated types [1]; but since UCDs don't conform to the production for NMTOKEN (admittedly only because of the presence of the semicolon), they can only go in CDATA attributes, which I'm pretty positive are opaque in the terms of the XML Infoset. That means they're opaque for DOM, SAX, anything based on DTDs, all non-validating parsers, lightweight fault-tolerant parsers, all sorts.
This isn't quite hair-splitting (though I agree it's perilously close to it!). XSchema APIs are important, but they're not the only reasonable way to get at XML content.
[1] <http://www.w3.org/TR/2004/REC-xml-20040204/#sec-attribute-types>
> I would like to also disagree about UCDs and XML being orthogonal: a
> document with a UCD which doesn't
> conform to the standard is at best faulty and at worse a sign that it
> has been garbled in transmission,
> so you have to check the syntax at some point anyway. The question is
> whether you want to be very
> forgiving about garbage UCD's (which most XML parsers won't like if
> they get to check the syntax) and
> whether you want to maintain 2 parsers instead of 1 (assuming we could
> get XML parsers to do UCDs
> as well).
UCDs are not just for VOTables, but for URLs, FITS headers, and database columns, too. The most common/visible current use of UCDs is in an XML context, but that's just coincidence.
And I disagree, again, that an XSchema library/API can do any useful validation of UCDs (and the XML parser by itself can do nothing, for at that level the string is still opaque). Checking that a putative UCD matches the UCD production will catch a few extreme errors, but you surely have no hope of having the XSchema API catch `pos.eq.ra;meta.mian' or `pos.eq.ra;this.is.not.a.ucd'.
Best wishes,
Norman
-- ---------------------------------------------------------------------- Norman Gray : Physics & Astronomy, Glasgow University, UK http://www.astro.gla.ac.uk/users/norman/ : www.starlink.ac.ukReceived on 2005-06-03Z12:33:00