RE: [F&O] Casting to xs:NOTATION, xs:QName not clarified

The problem is that in some implementation environments, dynamic
execution of expressions is considered a security risk and it is not
clear how this will relate to static typing of the query and some other
issues. The WG has decided to not standardize this aspect in this
version to gain more experience with the existing language feature and
to maybe adding it at a later point (vNext).

Best regards
Michael (speaking for myself)

> -----Original Message-----
> From: Laurens Holst [mailto:lholst@students.cs.uu.nl]
> Sent: Monday, January 17, 2005 5:18 PM
> To: public-qt-comments@w3.org
> Cc: Michael Rys; Ashok Malhotra
> Subject: Re: [F&O] Casting to xs:NOTATION, xs:QName not clarified
> 
> Michael Rys wrote:
> >>That aside, a quick question... I have been looking at the spec for
a
> >>little while to find a way to resolve an xs:string, containing an
> >>XPath query, to a nodeset... Does anyone know how to achieve that?
:)
> >
> > By means of some non-standardized mechanism. :-)
> 
> Right. Wouldn't it be a good idea to create a standardized mechanism
for
> this?
> 
> My current use case:
> 
> <input type="text" value="//p" />
> <button b:action="alert" b:value="{count(getnode(/input/@value))}">
>      Count nodes
> </button>
> 
> The idea is that the user has an input field, which he can fill in
with
> an XPath query (this input is reflected back into the DOM), and then
> click on a button called 'count'. This should pop up an alert box
which
> contains the nr. of matches for the given XPath query. But, for that
we
> need some function or cast which evaluates the string retrieved from
the
> value attribute as an XPath query.
> 
> Now we could implement our own syntax for this. But then again, we
could
> not, if there were to be a standard mechanism for this (it doesn't
seem
> that uncommon a thing to want to do, does it?). Maybe node() could be
> given an optional parameter?
> 
> 
> Ashok Malhotra wrote:
> >>What confuses me is, that in the 'Status of this Document' section
of
> >>XQuery 1.0 and XPath 2.0 Functions and Operators, it says:
> >>
> >>"Some of the more significant changes that appear in this version of
> >>the document are:
> >>
> >>     * Casting to QName and xs:NOTATION has been clarified. It is
now
> >>possible to cast from xs:string literals to QName and xs:NOTATION."
> >
> > That was a bug in the status section.  It now says...
> >
> > "Construction of xs:QNames and types derived from xs:NOTATIONs has
> > been clarified. It is now possible to construct xs:QNames and types
> > derived from xs:NOTATIONs from xs:string literals."
> 
> Right, so the xs:QName("a") example Frank Legler gave is possible, but
> it's not possible to e.g. do xs:QName(text()), or to cast it.
> 
> 
> ~Grauw
> 
> --
> Ushiko-san! Kimi wa doushite, Ushiko-san!!

Received on Tuesday, 18 January 2005 01:22:12 UTC