Re: document node attributes

On Tue, 2013-06-11 at 01:02 +0000, Rushforth, Peter wrote:
> Hi,
> 
> According to the XML data model, is it conceivable that the document node (not the root element)
> be deemed to carry virtual, hard coded 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.

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

> 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. You
could define neoxml:head and neoxml:body instead, as another approach.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

Received on Tuesday, 11 June 2013 02:52:24 UTC