|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Schema Typed Parameters and Return Values in Library ModulesFlorent Georges lists at fgeorges.orgWed Jul 28 19:36:01 PDT 2010
Daniela Florescu wrote:
> On Jul 19, 2010, at 3:46 PM, Michael Kay wrote:
Hi,
I am sorry to respond to a quite old thread, I am still going through my unread emails, because I am back from holidays...
>> I think if I were writing a library for a vocabulary where
>> schema validation is the norm (like FpML, say),
> What would you do for the EXPath's HTTP module ?
I think that would be definitely a bad idea to define the HTTP
function as:
http:send-request($request as schema-element(http:request))
instead of the current definition:
http:send-request($request as element(http:request))
If I am right, Zorba did use the former then now is using the
later (for what I can see in the nightly build deployed online).
The former impose explicit validation by the user, while the
typical usage is:
http:send-request(
<http:request href="..." ...>
...
</http:request>
)
and there is no need to explicitly validate. The specification
can simply say: "if the parameter is not valid regarding the
schema, then this is an error err:XXXNNN". Note that the later
version will accept both explicitly validated elements as well
as non-validated elements.
But indeed, EXPath has specific needs and requirements, like to
be portable across several processors, including XQuery but also
XSLT and XProc, not all supporting validation, which is not
required by the specs.
Regards,
--
Florent Georges
http://fgeorges.org/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






