[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

since I promised not to crosspost

Subject: since I promised not to crosspost
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 9 Jan 2002 23:35:15 GMT
how cross post functions

grumble grumble....

Date: 9 Jan 2002 23:33:34 +0000
From: David Carlisle <davidc@xxxxxxxxx>
To: ashokma@xxxxxxxxxxxxx
CC: www-xml-query-comments@xxxxxx,w3c-xml-query-wg@xxxxxx
In-reply-to:
	<E5B814702B65CB4DA51644580E4853FB019EE73B@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
	(ashokma@xxxxxxxxxxxxx)
Subject: Re: Comments on December F&O draft


[I cut xsl-list out of the cc as the list owner ticked me off for
crosposting, I'll post it to that list separately]

Thanks for the feedback.

> [AM] The F&O provides constructors for all built-in XML Schema
> datatypes.

Yes, I see how it got there, the question though is whether some of the
types are useful (especially this one) normalisedstring is useful in
schema as it essentially gives a different mapping from the lexical form
but the value is a string, or at least may as well be, you can't do
much else with such a beast except coerce it to a string can you?
And as I mentioned in my note I'm not sure the rules on #xD are correct
if you can not assume an XML parser pre-pass that will have normalised
all #D#A pairs to #A.

> [AM] The only error would be if one or both operands were not booleans.
> This would be caught when the operands of the operator were type
> checked.  

you can get errors in type checked boolean expressions. can't you?
document('non existing file or server timeout')/a/b/c=2
is a boolean expression that may fail in some sense or other, but
$safe-to-try-external-files and document(......)=2
may always safely return a boolean if the boolean valued variable
is a reliable guard to avoid unsafe access, but this relies on the
system not evaluating the document() call if the guard is false.

> [AM] We tried to do this except where the name includes the name of a
> XML Schema datatype which uses intercapitalization, hence xf:dateTime().

I can live with this but as I commented I think it would be better to
use the xslt 1.1 camelcase to xpath-names mapping, even here.

> [AM] Noted.  Frankly, we are not sure how important functions on base64
> and hexBinary are?  Would appreciate feedback.
pass:-)

> [AM] deep-copy?
better, anything except copy:-)

> [AM] At this time there is but one function library.
well i assume (as in XSLT 1) XSL will manage to slip in a few XSL
specific functions via some mechanism or other (from some namespace or
other) key() being the main example, assuming the F&O document is made
more like XSLT's document() so that XSLT no longer needs its own version
of that.. If XSLT can have its extra functions I don't see why
Xquery can't.


> [AM] We do not have nested sequences. 
(it would be nice if the drafts gave some background to that decision
which often creates surprises with the cardinality of sequences changing
when you map functions over the sequnce(with for ) as individual items
might map to sequences which get flattened or () which vanishes)
however getting back to the point:

>So, we start by creating a one-level sequence.
That's what I assumed had to be the case, but I don't think that's what
the drafts say as the variable used is the input sequence of nodes so
count() would give the node count not the flattened sequence count.
(You need some syntax for a "meta variable" for the flattened sequence I
think, or give the expanded definition of avg which must be something
like

avg($x) is (I think:-)

sum(for $i in $x return data($i)) div count(for $i in $x return data($i))

> The sum of an empty sequence should be 0 not ().
> 
> [AM] We follow the SQL definition.
SQL can define what nul means in SQL.
Xquery can not define what an empty node collection means in XML
as it's working with XML that isn't specifically defined for Xquery.
If you know the doctype/schema for this document type implies that () 
makes sense as a return type for sum then fine, but in general you can't
know that and () is just a terrible value to inject into an arithmetic
expression, it will mean that you can never use sum() without having to
special case for this and correct it to 0.

> [AM] The name was generated by the XQuery syntax folks.
maybe, but I can still say it's a bad name if I want:-)

David



_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.