RE: Behaviour of fn:string on sequences

As I think I tried to convey, the design decisions on the nature of
sequences in the XPath 2.0 data model were made at quite an early stage.
They have proved robust, and appear to work well in most cases. I certainly
wouldn't claim that it is the only possible model, or even that it is
provably the best, and I would fully accept that there are some use cases
where a different model might be better. But you have to make decisions on
the fundamentals of a language, and we would only change them now if there
was very strong evidence that they were unsound. If someone else wants to
design a different language built on different foundations, they are welcome
to attempt it.

> 
> Question: Why is it not possible to nest sequences ?

In my view, the best answer to this is that we don't want to have two ways
of representing trees: it would be too confusing. This is an XML-based data
model, and the right way to represent a tree in our model is using nodes
that model XML elements.
> 
> So why are you forcing XPath sequences to have the same 
> semantics as XML Schema sequences.

Because the essence of our design philosophy for the type system is to
remain as close to XML and XML Schema as we possibly can.
> 
> I am trying to use XPath 2.0 as a standalone expression language that 
> has nothing to do with either XQuery, or XSLT. The reason I am doing 
> this is that it is standard, and is being used in other W3C 
> standards, 
> such as XForms. The fact that sequences are treated in this way does 
> make it much harder to use.
> 
> Question: The XPath 2.0 specification seems to be driven by 
> XQuery and 
> possibly XSLT, what other W3C WG are involved in it ? XForms ? DIWG ?
> 

The development process is very open, and we have received comments on our
drafts (and especially, on our requirements documents) from many other W3C
groups. There is also cross-membership of companies and sometimes of
individuals.

There is still plenty of opportunity for commenting on the drafts, but
please don't expect anyone at this stage to go back to the drawing board. We
could explore alternative designs for the next 100 years, or we could ship
something that works now and leave other people to design better things to
replace it in the future.

Michael Kay

Received on Friday, 31 October 2003 14:24:38 UTC