W3C home > Mailing lists > Public > public-xmlhypermedia@w3.org > June 2013

Re: document node attributes

From: Liam R E Quin <liam@w3.org>
Date: Tue, 11 Jun 2013 11:51:34 +0900
Message-ID: <1370919094.25164.1031.camel@localhost>
To: "Rushforth, Peter" <Peter.Rushforth@NRCan-RNCan.gc.ca>
Cc: "public-xmlhypermedia@w3.org" <public-xmlhypermedia@w3.org>
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

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 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:42:06 UTC