W3C home > Mailing lists > Public > xproc-dev@w3.org > December 2008

Re: Entity Expansion

From: David A. Lee <dlee@calldei.com>
Date: Sat, 27 Dec 2008 10:54:44 -0500
Message-ID: <A5584965E6364E6093F300104E5B16A3@calldei.com>
To: "Norman Walsh" <ndw@nwalsh.com>, "XProc Dev" <xproc-dev@w3.org>

Quote NW:
> If you compare these they will not turn out to be identical due to the
> lack of the base URI in the "&subdoc;" or its resultant expansion.

I understand how not expanding entities would cause it to fail, but I
don't see how "adding a p:identity earlier in the pipeline" would cause
entities not to be expanded.
----- End Quote

Ah I misunderstood your question (and you mine :)

What I mean is this.  In an entity-expanding implementation, then I would 
presume that p:identity WOULD expand entities, and there's nothing in the 
specs to say it would have
to keep track of the base URI's for the elements it expanded.
This would then make a test like add-xml-base-001 fail because the 
p:identity would have lost where every element came from ... unless it was a 
requirement that any expanded entity kept the  base URI through the entire 
pipeline which would be yet a more complex requirement then I think you (or 
I) want to impose.   I dont think it could be done with adding xml:base 
attributes everywhere because it would break the rest of the specs that 
assume, unless otherwise noted, that no new attributes are added.
Thus the only way an implementation could preserve the base URI's would be 
some 'secret back door channel' that preserves node identity and base URI's 
throughout the pipeline.  Yuck.

So in conclusion, What I think is true ...
1) The specs dont say anything one way or another about entity expansion, 
although there's the implicit assumption that they probably are expanded at 
any conceviable step.  And presumably,
since its not stated, dont have to keep track of where the expansion came 
from (base uri).

2) add-xml-base-001 is actually not testable as-is because there is no 
requirement that implementations actually preserve the base URI when they 
expand entities, or do or do not expand entities.

I certianly think the "intent" of add-xml-base-001 is correct, and I will 
try to make my implementation match it, but I dont think its testable, that 
is, I dont think it should strictly be considered a failure if the step 
didnt expand entities, or somehow lost where the expanded node came from.

-----------------------------------------------------------
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org 
Received on Saturday, 27 December 2008 15:55:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 27 December 2008 15:55:31 GMT