[CWM] Question about notation, restoring trees out of triples

Dear Rdf Interested,

Can you please help think about this problem :

I would like to transform a set of triples that form an a-cyclic graph,
a tree even from this notation :

_:foo     <#rel> _:bar .
_:bar     <#rel> _:baz .

Into this notation :

_:foo     <#rel> [ <#id> _:bar;  <#rel> _:baz ].

The problem is that i would also like to copy the attributes :
_:bar     <#attr> "FooBar" . 
as well
to make 
_:foo     <#rel> [ <#id> _:bar;  <#rel> _:baz;  <#attr> "FooBar" ].

The rules I have tried are  :

{
  ?X ?P ?Y.
}
=>
{
?X  ?P
    [
	:id ?Y.
    ] 
}.

But the produces lots on anonymous [id: <#blah>] objects that are not
connected.

Is it possible to restore such a tree structure back in the [ a :tree;
:branch [ a :branch]] notation using cwm?

if so how can this be done? If not, does anyone else need this feature?

thanks

mike



=====
James Michael DuPont
http://introspector.sourceforge.net/

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Received on Monday, 8 September 2003 03:26:42 UTC