Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 67586 invoked from network); 30 Jul 2007 19:28:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2007 19:28:18 -0000 Received: (qmail 80444 invoked by uid 500); 30 Jul 2007 19:28:14 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 80351 invoked by uid 500); 30 Jul 2007 19:28:14 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 80340 invoked by uid 99); 30 Jul 2007 19:28:14 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 12:28:14 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [129.128.5.19] (HELO pilsener.srv.ualberta.ca) (129.128.5.19) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 19:28:06 +0000 Received: from [192.168.0.101] (S0106001346196329.ed.shawcable.net [70.74.4.175]) (authenticated bits=0) by pilsener.srv.ualberta.ca (8.13.7/8.13.7) with ESMTP id l6UJRgP3000453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 30 Jul 2007 13:27:42 -0600 (MDT) Message-ID: <46AE3BBB.3020900@ualberta.ca> Date: Mon, 30 Jul 2007 13:27:55 -0600 From: Andrew Cave User-Agent: Thunderbird 2.0.0.0 (X11/20070501) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Missing feature in XIncludeTransformer References: <46A0FC3B.6030708@ualberta.ca> In-Reply-To: <46A0FC3B.6030708@ualberta.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I'm curious as to why this failed to generate responses. Maybe someone could offer me some advice. Should I have just submitted my patch to JIRA first, or is there something else I should have done? Thanks, Andrew Cave Andrew Cave wrote: > Hello, > > I noticed that Cocoon's XIncludeTransformer seems to be missing the > base URI fixup support specified in the W3C's XInclude spec [1] > (Careful, this is distinct from supporting xml:base to resolve > relative xi:include hrefs against). > > In short, it says that the base URIs of documents do not change when > passed through an XInclude parser. This means that xml:base attributes > with the value of the current base URI should be added to the top > level included elements. To see an example, the xmllint parser (part > of libxml2) will perform this attribute insertion when you enable > XInclude processing. > > I think this feature is important because otherwise, relative URIs > (i.e. links) in an included document will break if the included > document is not located in the same directory. Adding the xml:base > attribute to the result gives later content handlers the ability to > resolve relative URIs against the base. (In particular, I'm thinking > of using XPath 2.0's resolve-uri function). > > Any thoughts? Is this a feature we need to see? > > I think this is the cleanest and most general solution for resolving > relative URIs in included documents -- not to mention it's required by > the XInclude spec. Pending discussion here, I've created a patch that > adds this support that I can submit to JIRA. > > -- > Andrew Cave > > [1] http://www.w3.org/TR/xinclude/#base - The Base URI Fixup section > of the W3C's XInclude specification > > >