HttpClient

From EXPath

(Difference between revisions)
Jump to: navigation, search
Line 8: Line 8:
contributed an XSD schema for the elements in the http:* namespace
contributed an XSD schema for the elements in the http:* namespace
(request, response, header, etc.): [[File:Http-client-mpilman.xsd]].
(request, response, header, etc.): [[File:Http-client-mpilman.xsd]].
 +
 +
==Serialization==
 +
 +
Proposed change to the current draft, regarding the serialization
 +
of bodies.  It should be possible to set any serialization
 +
parameter, as defined in [http://www.w3.org/TR/xslt-xquery-serialization-11/ XSLT and XQuery Serialization 1.1].
 +
Consistently with the current definition of
 +
[http://www.w3.org/TR/xpath-functions-11/#func-serialize fn:serialize()],
 +
@use-character-maps cannot be used.  The @format attribute, which
 +
was introduced after xsl:result-document, has been removed too
 +
(at least one leading XSLT 2.0 processor does not allow an
 +
extension function to access the named output definitions, see
 +
this [http://groups.google.com/group/expath/browse_frm/thread/806a31c109f11c7b thread]).
 +
 +
The @src attribute is not in Serialization 1.1. It is mutually
 +
exclusive with all other attributes (except the required
 +
@media-type).  The method "binary" has been added too (must be
 +
defined precisely, but normally should only accept xs:base64Binary
 +
and xs:hexBinary items and serialize them as binary).
 +
 +
<pre class="brush:xml">
 +
<http:body media-type = { string }
 +
          src? = uri
 +
          method? = { "xml" | "html" | "xhtml" | "text" | "binary"
 +
            | qname-but-not-ncname }
 +
          byte-order-mark? = { "yes" | "no" }
 +
          cdata-section-elements? = { qnames }
 +
          doctype-public? = { string }
 +
          doctype-system? = { string }
 +
          encoding? = { string }
 +
          escape-uri-attributes? = { "yes" | "no" }
 +
          include-content-type? = { "yes" | "no" }
 +
          indent? = { "yes" | "no" }
 +
          normalization-form? = { "NFC" | "NFD" | "NFKC" | "NFKD"
 +
            | "fully-normalized" | "none" | nmtoken }
 +
          omit-xml-declaration? = { "yes" | "no" }
 +
          standalone? = { "yes" | "no" | "omit" }
 +
          suppress-indentation? = { qnames }
 +
          undeclare-prefixes? = { "yes" | "no" }
 +
          output-version? = { nmtoken }>
 +
  any*
 +
</http:body>
 +
</pre>

Revision as of 13:48, 21 December 2009

HTTP Client module.

http://www.expath.org/modules/http-client/

Schemas

Markus Pilman, from the FLWOR foundation, contributed an XSD schema for the elements in the http:* namespace (request, response, header, etc.): File:Http-client-mpilman.xsd.

Serialization

Proposed change to the current draft, regarding the serialization of bodies. It should be possible to set any serialization parameter, as defined in XSLT and XQuery Serialization 1.1. Consistently with the current definition of fn:serialize(), @use-character-maps cannot be used. The @format attribute, which was introduced after xsl:result-document, has been removed too (at least one leading XSLT 2.0 processor does not allow an extension function to access the named output definitions, see this thread).

The @src attribute is not in Serialization 1.1. It is mutually exclusive with all other attributes (except the required @media-type). The method "binary" has been added too (must be defined precisely, but normally should only accept xs:base64Binary and xs:hexBinary items and serialize them as binary).

<http:body media-type = { string }
           src? = uri
           method? = { "xml" | "html" | "xhtml" | "text" | "binary"
             | qname-but-not-ncname }
           byte-order-mark? = { "yes" | "no" }
           cdata-section-elements? = { qnames }
           doctype-public? = { string }
           doctype-system? = { string }
           encoding? = { string }
           escape-uri-attributes? = { "yes" | "no" }
           include-content-type? = { "yes" | "no" }
           indent? = { "yes" | "no" }
           normalization-form? = { "NFC" | "NFD" | "NFKC" | "NFKD"
             | "fully-normalized" | "none" | nmtoken }
           omit-xml-declaration? = { "yes" | "no" }
           standalone? = { "yes" | "no" | "omit" }
           suppress-indentation? = { qnames }
           undeclare-prefixes? = { "yes" | "no" }
           output-version? = { nmtoken }>
   any*
</http:body>
Personal tools