RE: XML Syntax Issues / root element

"Boley, Harold" <Harold.Boley@nrc-cnrc.gc.ca> writes:

> > 1.  Under "Is the XML root element 'rdf:RDF'?", I think you ...
> 
> I think there is no big difference between XML editors and XML
> validators here -- if you meant dialect URIs are only *added*,
> then also XML editors *could* find them at the other place.

The XML editor I use (emacs nxml mode) can only dispatch to different
schema based on the root element.   (which makes a lot of sense -- it's
not appropriate to look past the root if you don't know the schema.)

So that's a specific reason to put the dialect name at the root.

In anycase, the reason you give is not a reason to use the dialect name
as the root.

> > Why are you using "type" (eg rif:type) instead of xsi:type there?
> 
> For uniformity reasons: rif:type is more general than xsi:type.
> For example, we also have rif:type=3D"rif:local".

But you argued earlier in favor as xsi:type as working with XML tools.
You've decided against that now?

> > More on that -- Using attributes on Const vs. using subclass of
> > Const is a style issue, as I understand it.
> 
> By analogy, your
> 
> <Var id="var_x" />
> 
> is preferable to something like
> 
> <Var>
>   <identifier>var_x</identifier>
> </Var>

The point is that I'd like principles for deciding when to use attibutes
and when to use elements.  Principles that can be hard-coded into the
software, preferably, so dialect designers don't need to be XML
designers.

The two consistent sets of principles I know are:

    1.  always use elements
and
    2.  alwase use elements, except for particular structures
        defined across all dialects.    The bits of RDF/XML I
        was suggesting using are intended to be stable across all
        RIF dialects (and in fact are already stable across all
        RDF/XML).

   -- Sandro

Received on Monday, 24 September 2007 01:44:45 UTC