- From: Norman Walsh <ndw@nwalsh.com>
- Date: Wed, 17 Dec 2008 12:19:58 -0500
- To: public-xml-processing-model-comments@w3.org
- Message-ID: <m263libtxd.fsf@nwalsh.com>
Toman_Vojtech@emc.com writes: [...] > In Section 2.4.1 of the spec, there is a sentence that lists the Infoset > properties that all processors must preserve, one of which is the 'base > URI' property. However, in the very same sentence it also says that this > holds for all steps "except where the semantics of a step explicitly > require changes". > > In my view, p:delete is clearly a step that updates the source document. I think that's intended to be viewed a littel more narrowly. Removing an attribute doesn't change the children property, or the local name property, nor would I expect it to change the base URI property. > The problem I have is that I simply don't know what should happen to > document nodes if you remove the xml:base attribute. Suppose I remove > chap/@xml:base in the following example: > > <doc xml:base="http://foo.com"> > <chap xml:base="http://bar.com"> > <p>...</p> > </chap> > </doc> > > If the 'base URI' property of the node is to be preserved, the base URIs > of both the 'chap' and 'p' elements will remain "http://bar.com". Or, > should the base URI of 'chap' and 'p' be recalculated so that it is > "http://foo.com" after removing chap/@xml:base? I think the base URI property should be preserved. The infoset spec says that base URIs are calculated according to XML Base. Having been calculated, I don't think deleting the xml:base URI implies that they are re-calculated. We have a use case in our requirements document that relies on this behavior, FWIW. > I just don't know. I can also see similar questions with steps that can > modify or create @xml:base attributes: p:add-xml-base (maybe this one is > OK), p:string-replace, p:add-attribute, p:set-attributes (now I am > wondering: can you actually address/create xml:base with these steps??). Well, somewhat inconsistently perhaps, it seems to me that changing the xml:base attribute should change the base URI property. Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | Men are more like the times they live http://nwalsh.com/ | in than they are like their | fathers.--Ali Ibn-abi-talib
Received on Wednesday, 17 December 2008 17:20:43 UTC