[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-rdf
Subject:    Re: template builder problem ?
From:       vaab <vaab () chez ! com>
Date:       2005-04-24 20:13:03
Message-ID: d4guq1$15o2 () ripley ! netscape ! com
[Download RAW message or body]

> You actually can do that, can you give some example code of what isn't 
> working?

xul link : http://tharbad.ath.cx/rdf/test.xul
txt link : http://tharbad.ath.cx/rdf/test.xul.txt
(is actually a symlink to http://tharbad.ath.cx/rdf/test.xul)
rdf source link : http://tharbad.ath.cx/rdf/test.rdf

> You are using the full extended syntax right?

Yes (if you speak of conditions, bindings, action tags). My problem is 
around the detection of the container state. Using the "containment" 
attribute do not parse the property in the right way round.

This is snipset of my code  :
-------------------
<tree id="test"
       flex="1"
       datasources="knowledge.rdf"
       ref="http://www.w3.org/2000/01/rdf-schema#Resource">

   <treecols >

     <treecol label="label"
	     id="label"
	     flex="1"
	     primary="true" />
     <splitter class="tree-splitter"/>
     <treecol label="comment" id="comment" flex="1"/>

   </treecols>

   <template>
     <rule>

       <conditions>
	<content uri="?uri" />
	
	<triple subject="?sub"
		predicate="http://www.w3.org/2000/01/rdf-schema#subClassOf"
		object="?uri" />
	
       </conditions>
       <bindings>
	<binding subject="?sub"
	       predicate="http://www.w3.org/2000/01/rdf-schema#label"
	       object="?label"/>
	<binding subject="?sub"
                predicate="http://www.w3.org/2000/01/rdf-schema#comment"
	       object="?comment"/>
       </bindings>
		
       <action>
	<treechildren flex="1">
	  <treeitem uri="?sub" persist="open">
	    <treerow>
	      <treecell label="?label"/>
	      <treecell label="?comment"/>
	    </treerow>
	  </treeitem>
	</treechildren>
	
       </action>
     </rule>
   </template>

</tree>
-----------------

this is our 3 triples stored in test.rdf :

Class --> subClassOf --> Resource
Datatype --> subClassOf --> Class
Property --> subClassOf --> Resource

If I set the containment property to subClassOf, this is what we get in 
ascii : (check the result here : http://tharbad.ath.cx/rdf/test.xul )

[-] Class
  \- [-] Datatype
[-]- Property

All elements are drawn as container (and this is normal, since they are 
all at least "subClassOf" an other element). But what we want is to test 
ArcLabelsIn AND NOT ArcLabelsOut ! the use of the containment attribute 
doesn't seem to be our solution. The current use of containment is 
improper as it (for example) draws "Property" and "Datatype" as 
container, and they shouldn't as they haven't any subClass declared.

If I remove the containment property, I have

    Class
    Property

No element is concidered as a container. But "Class" element should be ! 
as it have at least one subClass...

I have tried several rules, and could separate with different conditions 
what should be a container and what should'nt. And setting "by hand" the 
container attribute to "true" or "false" do not work as these setting 
are overridden by the builder... wrongly.

is it clearer ?  If this is really possible, the solution could fit 
neatly in the examples of the xul planet site as test.rdf is a subset of 
the rdf schema of the w3c.
If this is not possible, I'd like to have some hints to make a patch, as 
the modifications needed to cpp source to support this type of query 
seems quite lite compared to the added value (that is for me WAY MUCH 
usefull than the default behavior).

Thx for your help.

Valentin
_______________________________________________
Mozilla-rdf mailing list
Mozilla-rdf@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-rdf
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic