RE: document node attributes

Trying to whip this horse one more time.  I *do* wish it would run :)

<root hm:href="someplace" xmlns:hm="">

is that so bad ?

David Lee
Lead Engineer
MarkLogic Corporation
Phone: +1 812-482-5224
Cell:  +1 812-630-7622

-----Original Message-----
From: Rushforth, Peter [] 
Sent: Tuesday, June 11, 2013 8:52 AM
Subject: RE: document node attributes

> There are multiple data models used with XML - W3C hs 
> specific more than one, and there are others.
> The XPath and XQuery Data Model is the most recent; the XML 
> DOM is another, and some people have argued that the XML 
> Information Set is another.
> XML people tend to be nervous about "hard-coded" but it's 
> true that XML Base would suggest a base URI property.
> But, the DOM spec does do the sort of thing you want, 
> although as properties since the document node can't really 
> have XML attributes, being outside the document.

Oh yes.

> Of course, you'd be abandoning XPath, XQuery, XSLT, XSD, 
> XProc, since such metadata isn't transmitted in XML documents.

Not an acceptable trade off.

> > In other words, could a media type definition say that the document 
> > node of this media type has these fixed attribute values?
> I don't really see advantages over attributes on the root 
> element. 

I think you're right, since once a 'message' gets separated from its
context/metadata there is no guarantee that it be labelled with application/nxml
anymore.  There needs to be, or perhaps just 'should be', an explicit 
bit of metadata such as @xml:href, etc on the root element.  I don't
think that unprefixed @href, @rel etc would work, since in appliaction/xml, they
would be in no namespace and hence not reliably associated with 
a particular meaning.  I was hoping to avoid that though, because of
course you can't have duplicate attributes so having xml:href=""
on the root element would preclude having it point to anything else.

> You could define neoxml:head and neoxml:body 
> instead, as another approach.

As in elements?  While willing to specify concrete attributes, I think
going to the extent of specifying elements is very xhtml or possibly
atom-like, and that has already been done.  

Anyway, it's just a thought experiment.


Received on Friday, 14 June 2013 17:57:44 UTC