[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] Re: TreeList implementation

From: Per Bothner
Subject: Re: [Qexo-general] Re: TreeList implementation
Date: Wed, 25 Feb 2004 23:55:19 -0800
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040113

Joseph Coffland wrote:

I appreciate your patience with me poking around at your design.

Hopefully others may find the discussion interestint.

1) I'm not convinced the type system is necessary.

I like (optional) static typing.  It helps catch bugs and it
helps a reader understand the program better.

2) I don't want to rely on FLOWR expressions for scoped local variables.
3) I want program blocks instead of commas.

I don't know what you mean by these.

In the mean time I have a paid contract for which I need to do some
XML processing and I'm trying to find a simple solution for what I need
now.  I've been able to do quite a lot with Qexo, but have gotten hung
up for lack of a couple of features.  1) the ability to pass in
parameters from the command line

Here's a workaround.  It looks like it may be broken in the CVS
version (I'll take a look), but it works in 1.7.90.

$ cat /tmp/prop.xql
declare variable $x { java.lang.System:getProperty("x", "unknown") };
declare variable $y { java.lang.System:getProperty("y", "unknown") };
"The value of x is ",$x, " while y is ",$y,"

$ java -Dx='X-value' -jar kawa-1.7.90.jar -f /tmp/prop.xql
The value of x is X-value while y is unknown

The second problem can be described as follows:

Given two documents:

<a att1="" ... attN="">


I want to append b to the root node a to get this document:

<a att1="" ... attN="">

let $a := doc("a.xml")/a return
let $b := doc("b.xml") return
element a {$a/@*, $a/node(), $b}

On another note, I've been looking into implementing the type system
for Qexo.  Xerces provides PSVI, but I haven't been able to figure
out how to check if a string matches a given data type.  Xerces must
do this when it validates a document against a schema.  This should
not be a problem for compile time type checking, but for run time
type checking I think it is necessary.  Any ideas on how to approach

Not sure what you mean by a string "matching" a data type.  A string
can be *cast* to a data type, and XQuery (but not Qexo) has a "castable"
        --Per Bothner
address@hidden   http://per.bothner.com/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]