> This is one of those "XML processing model" ratholes!
Agreed. But I'd still expect any solution to maintain order of XInclude as an *option*. I don't have a problem that Elliotte finds it distasteful. What I find perplexing is his categorical insistence that XInclude *must never* be applied during the process of XSLT transform.
> Uche, does your document() function also do XInclude expansion?
If the user choses it to, then yes.
As I pointed out, to XInclude or not to XInclude is optional for the user in 4XSLT.
> If so,
> I'd have to agree with Elliotte that it would be confusingly different
> than every other document() function on the planet!
Not any other XSLT processor that supported XInclude, e.g. libxslt.
Also, this smells like a red herring to me. The result of calling document() can also be different based on whether or not a validating parser is used, or based on the exact format of the HTTP request that is made, in the case of an HTTP URL. This is the ambiguity we deal with in the XML world, and all technologies suffer such ambiguities.
> I would say that if
> the XSLT specification does not describe a particular transformation be
> applied to the input stream, then this expansion is potentially
> confusing. I would personally not expect XInclude expansion to happen
> without my specific action.
Well, I personally would. And as I've mentioned, in most of my usage, I count on XInclude being applied at the layer right above the parse, pretty much universally.
Others might prefer otherwise, and they can turn it off without fuss.
I made XInclude the default because I was scratching my own itch. I haven't heard a *single* user complaint (and believe me, we get enough complaints about things on the 4Suite list) about XInclude processing being on by default in 4XSLT.
> How about this as a middle ground: Could you require some kind of
> statement in the XSLT transform that indicated that the user was aware
> that XInclude processing might take place?
Do you mean an extension element of some sort to set the option? Chicken and egg problem. It has to read the XSLT in order to see the extension, and it would need to apply XInclude, if desired, while reading the XSLT. A 2 pass solution is probably out of the question because of performance.
Right now it's an option on the command line or on the Processor Python object initializer.
--
Uche Ogbuji Principal Consultant
+1 720 320 2046
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Boulder, CO 80301-2537, USA
XML strategy, XML tools (http://4Suite.org), knowledge management