Re: [xsl] XInclude as an XSLT transformation?
Subject: Re: [xsl] XInclude as an XSLT transformation?|
From: Oleg Tkachenko <oleg@xxxxxxxxxxxxx>
Date: Thu, 30 Dec 2004 12:22:30 +0200
Colin Paul Adams wrote:
Now that XInclude is a recommendation, I took another look at it.
Since it is essentially a tranformation on the XML Information Set, it
occurs to me it ought to be possible to write a generic XInclude
processor in XSLT.
Well, one can implement some XInclude basics in XSLT (and many did), but
developing a conforming implementation would be not a piece of cake and
can't be done with pure XSLT1 for sure. There are some troubles here I see:
1. Including of non-XML resources.
2. Detecting encoding of non-XML resources.
3. Checking for forbidden in XML characters in non-XML resources.
4. Detecting errors when fetching resources - in order to implement
fallback an XInclude implementation has to catch numerous errors and
distinguish between resource errors (such as file not found) and fatal
errors (such as attempts to include malformed XML).
5. Setting HTTP headers when fetching external resources.
6. Preserving DOCTYPE.
Multiconn Technologies, Israel