It seems Jonathan Marsh has joined the blogosphere with his new blog Design By Committee. If you don't know Jonathan Marsh, he's been one of Microsoft's representatives at the W3C for several years and has been an editor of a variety of W3C specifications including XML:Base, XPointer Framework, and XInclude.

In his post XML Base and open content models Jonathan writes

There is a current controversy about XInclude adding xml:base attributes  whenever an inclusion is done.  If your schema doesn't allow those attributes to appear, you're document won't validate.  This surprises some people, since the invalid attributes were added by a previous step in the processing chain (in this case XInclude), rather than by hand.  As if that makes a difference to the validator!

Norm Walsh , after a false start, correctly points out this behavior was intentional.  But he doesn't go the next step to say that this behavior is vital!  The reason xml:base attributes are inserted is to keep references and links from breaking.  If the included content has a relative URI, and the xml:base attribute is omitted, the link will no longer resolve - or worse, it will resolve to the wrong thing.  Can you say "security hole"?

Sure it's inconvenient to fail validation when xml:base attributes are added, especially when there are no relative URIs in the included content (and thus the xml:base attributes are unnecessary.)  But hey, if you wanted people or processes to add attributes to your content model, you should have allowed them in the schema! 

I agree that the working group tried to address a valid concern. But this seems to me to be a case of the solution being worse than the problem. To handle a situation for which workarounds will exist in practice (i.e. document authors should use absolute URIs instead of relative URIs in documents) the XInclude working group handicapped using XInclude as part of the processing chain for documents that will be validated by XML Schema.

Since the problem they were trying to solve exists in instance documents, even if the document author don't follow a general guideline of favoring absolute URIs over relative URIs, these URIs can be expanded in a single pass using XSLT before being processed up the chain by XInclude. On the other hand if a schema doesn't allow xml:base elements everywhere (basically every XML format in existence) then one cannot use XInclude as part of the pipeline that creates the document if the final document will undergo schema validation.

I think the working group optimized for an edge case but ended up breaking a major scenario. Unfortunately this happens a lot more than it should in W3C specifications.


 

Categories: XML
Tracked by:
"Jonathan Marsh is blogging" (Signs on the Sand) [Trackback]
"XInclude: Design by committee strikes again!" (Ken Brubaker) [Trackback]
"jhonny depp" (jhonny depp) [Trackback]
"albergo bournemouth" (albergo bournemouth) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"mediale affari" (mediale affari) [Trackback]
"midi colonna sonore" (midi colonna sonore) [Trackback]
"memory card" (memory card) [Trackback]
"new york four seasons hotel" (new york four seasons hotel) [Trackback]
"immagini disney" (immagini disney) [Trackback]
"gioco scaricare gratis pc" (gioco scaricare gratis pc) [Trackback]
"MUSIC - Gloria" (MUSIC - Gloria) [Trackback]
"amministratore condominiale" (amministratore condominiale) [Trackback]
"freddissimo gradito papa" (freddissimo gradito papa) [Trackback]
"val d aosta" (val d aosta) [Trackback]
"vacanza ad ischia" (vacanza ad ischia) [Trackback]
"gioco adulto gratis" (gioco adulto gratis) [Trackback]
"calendario 2003" (calendario 2003) [Trackback]
"MUSIC - Bethlehem Morning" (MUSIC - Bethlehem Morning) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"HOME" (HOME) [Trackback]
"londra big ben" (londra big ben) [Trackback]
"l attimo fuggente" (l attimo fuggente) [Trackback]
"bionde masturbandosi" (bionde masturbandosi) [Trackback]
"PRODUCTS" (PRODUCTS) [Trackback]
"giochi carta regolamento" (giochi carta regolamento) [Trackback]
"PARTNERS" (PARTNERS) [Trackback]
"SCHEDULE" (SCHEDULE) [Trackback]
"MUSIC - Mary Did You Know/What Child Is This?" (MUSIC - Mary Did You Know/What ... [Trackback]
"MUSIC" (MUSIC) [Trackback]
"CONTACT" (CONTACT) [Trackback]
"PHOTOS" (PHOTOS) [Trackback]
"perline gioiello" (perline gioiello) [Trackback]
"scuola superiore" (scuola superiore) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"torte bindi" (torte bindi) [Trackback]
"pulcino fottilo nella residenza" (pulcino fottilo nella residenza) [Trackback]
"OUTREACH" (OUTREACH) [Trackback]
"medio apparecchio" (medio apparecchio) [Trackback]
"albergo firenze hotel" (albergo firenze hotel) [Trackback]

Saturday, March 18, 2006 4:36:29 PM (GMT Standard Time, UTC+00:00)
Very interesting and beautiful site. It is a lot of helpful information. Thanks!
Comments are closed.