Nesting XML Documents

In the simple case where an XML document consists of elements, comments and PIs then Michael Kay's argument is true. However these are not the only things that can be contained in an XML document specifically looking at the document production in the XML grammar
document    ::=    prolog element Misc*
one notices that an XML document consists of a prolog, followed by an element which isn optionally followed by zero or more comments, processing instructions or whitespaces. So for Michael Kay's statement to be correct this means that an element should be able to hold everything an XML document can but upon looking at the XML grammar production for element
element    ::=    EmptyElemTag| STag content ETag
one notices that the an element can hold items that satisfy the content production and not the document production. So taking a look at the XML grammar production for content
content    ::=    CharData? (( element | Reference | CDSect | PI | Comment) CharData?)*
we note that a vital part of the production for document is missing. Specifically one cannot have a prolog within an element. What does this disallow explicitly? Well let's take a look at the production
prolog    ::=    XMLDecl? Misc* (doctypedeclMisc*)?
So it seems that neither an XML declaration nor a DocType declaration can be nested within an element. This means that one cannot nest XML documents that require a doctype declaration such as XHTML documents nor can one use a nested XML declaration to change the version, encoding or standalone status of an XML document.

So from where I sit XML is specifically designed to limit such nesting.


XQuery in SQL Server

An official page on the next version of SQL Server sprang up yesterday on the B0rg site. To my knowledge this is the first official acknowledgement that Yukon will
support both relational and XML data natively...XQuery, and XML Schema Definition (XSD)
XML Everywhere learn it, live it, love it.


RSS Bandit Update

While I've been gone my co-developers have been hard at work on RSS Bandit. Joe Feser has implemented caching feeds on disk while Torsten has been updating the GUI and working on adding autoupdating functionality. Given that I was gone last weekend my schedules been out of whack for the past few days.

I need to code review Joe's code and do some integration testing with the current GUI. If that works out there may be an RSS Bandit 1.0c release shortly. I also need to bring myself up to date with the work Torsten's been doing which probably would qualify for a moving the version number up to 1.1 whenever his work is done.

The primary issue now is how to get auto-update working. I spoke to someone at GotDotNet yesterday but there are some sticky issues because the mechanism Torsten tried requires a server with HTTP-DAV support. However even if we rewrite it to use another mechanism there's still some logistics involved. One issue is where to place manifest file that the application uses to figure out if new updates are ready. More importantly is decided whether the bits to download should be an executable, DLL or ZIP file. My initial instinct was ZIP file until I started wondering about figuring out how to programnmatically unzip the file and so on.

Bah, I need more free time. I haven't touched my EXSLT code in weeks.


Why I Love The US Government

Exhibit D


Get yourself a News Aggregator and subscribe to my RSSfeed

Disclaimer: The above comments do not represent the thoughts, intentions, plans or strategies of my employer. They are solely my opinion.