Re: How to use rdf:nextVal? (fwd)

For reference, I asked Chris to send feedback on Mozilla RDF experience
with the container vocab. See http://www.mozilla.org/rdf/doc/ for code
etc.

Dan

 ---------- Forwarded message ----------
Date: Tue, 02 Apr 2002 15:34:47 -0800
From: Chris Waterson <waterson@netscape.com>
To: mozilla-rdf@mozilla.org, Peter Wilson <PWILSON@GORGE.NET>
Newsgroups: netscape.public.mozilla.rdf
Subject: Re: How to use rdf:nextVal?
Resent-Date: Tue, 2 Apr 2002 15:32:34 -0800 (PST)
Resent-From: mozilla-rdf@mozilla.org

Peter Wilson wrote:
> I am implementing an RDFDatasource in Javascript to wrap a XML DOM
> document.
> I have the basic functions working and can use a template to generate UI
> widgets from an XML source.
>
> However, I still have a few problems:
> When processing rdf:Seq requests,  a call to GetTarget() for rdf:nextVal
> is made.
> Anyone got any idea what this is all about and what I should return for
> this request?

This is an unfortunate implementation detail. In order to terminate
iteration when reading elements from a sequence, the template builder
needs to know how many elements are _in_ the sequence. The `rdf:nextVal'
property is the index that would be assigned to the next element to be
added to the sequence; e.g., `1' if the sequence is empty, `2' if the
sequence has a single element, `43' if the sequence has 42 elements, etc.

There's a bug somewhere about getting the `nextVal' property out of the
`rdf' default namespace.

chris

Received on Tuesday, 2 April 2002 18:58:22 UTC