Re: RDF Containers in XUL Trees

R_O_O_K <[email protected]>
Newsgroups gmane.comp.mozilla.devel.rdf
Organization Aster City Cable
Message-ID <[email protected]>
Hi!

The trick is that writing
<rdf:Seq ...>
implicitly adds a rdf:nextVal predicate and thus
it is equal to sth like this

<rdf:Description rdf:nextVal="1">
   <rdf:instanceOf 
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq">
</rdf:Description>

Without this "nextVal" the template builder simply doesn't build the 
tree. I posted a comment on this at
http://www.xulplanet.com/tutorials/mozsdk/rdfsyntax.php
some time ago. Maybe it's high time it got into the RDF tutorial,
it seems to confuse many people.

(Anyone on the XULPlanet team reading this post?)

Best regards!
Michal Ziemski

Dnia 2005-01-10 21:16, Użytkownik Neil Stansbury napisał:
> Hi Axel,
> 
> Thanks for this,
> 
>> You can use containment or whatever the attribute is actually called 
>> on the template to add arcs to iterate over. What you do is hardly 
>> going to do alot useful, though.
> 
> 
> No but it will allow me to test whether a resource has the property of 
> 'my:Container' rather than just the generic 'rdf:Seq'. It just seemed to 
> make more sense semantically.
> 
>> You could use plain containers, and use a instanceOf in the enum to 
>> add a new class. Or you go without it completely. Mixing rdf:li with 
>> other parents is likely to achieve brokeness.
> 
> 
> If I use the following RDF the tree doesn't build:
> 
> <my:Container rdf:about="level1" my:name="Parent">
>   <rdf:instanceOf
>       rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"/>
>   <rdf:li rdf:resource="level2"/>
> </my:Container>
> 
> <my:Container rdf:about="level2" my:name="Child">
>   <rdf:instanceOf
>       rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"/>
>   <rdf:li rdf:resource="level3"/>
> </my:Container>
> 
> If I swap the 'my:Container' class for 'rdf:Seq' it builds fine.
> 
> I take it this is what you mean by:
> 
>  > Mixing rdf:li with other parents is likely to achieve brokeness.
> 
> So in theory at least, how does the tree consider an assertion a container?
> 
>> There is no such thing as a non-standard rdf container.
> 
> 
> As in rdf:Seq, rdf:Bag, rdf:Alt
> 
> 
> Cheers,
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.