xsl-list
[Top] [All Lists]

Re: Document() function: GET vs. POST

2005-11-12 06:31:54
"Colin" == Colin Paul Adams 
<colin(_at_)colina(_dot_)demon(_dot_)co(_dot_)uk> writes:

    Colin> If it were, then you would want an extension instruction

Thinking about it further, you will most likely need to specify a
document for use as POST data.

Something modelled on xsl:result-document therefore seems appropriate.
(Using xsl:result-document itself with an extension attribute wouldn't
be appropriate, because of the following restriction:

"[ERR XTRE1500] It is a recoverable dynamic error for a stylesheet to
write to an external resource and read from the same resource during a
single transformation, whether or not the same URI is used to access
the resource in both cases. The optional recovery action is
implementation-dependent: implementations are not required to detect
the error condition. Note that if the error is not detected, it is
undefined whether the document that is read from the resource reflects
its state before or after the result tree is written." 

Now the semantics of xsl:result-document are that of writing to a
final result tree. So to make use of the same URI in the document()
function would then not be legal. And it is desriable for
understanding of the stylesheet that the same URI be used.

So a reasonable solution seems to be to define an extension
instruction (where xxx is mentioned in an
[xsl:]extension-element-prefixes):

<xxx:post-data
href={uri-reference}
and serialization parameters etc.

whose semantic is defined to generate POST data for use in an http
POST request (or for any other URI schemes where this semantic makes
sense).

This also eliminates modality problems for the URI resolver - if the
effective value of the href attribute appears as the value of the
argument to doc(), or an argument to document(), and if the concept of
posting data is meaningful for the URI scheme concerned (e.g. http), 
then the serlialization of the result tree generated by xxx:post-data
will be used as post data in the request that obtains the resource.

-- 
Colin Adams
Preston Lancashire

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--