Closed
Bug 282207
Opened 21 years ago
Closed 21 years ago
anonymous content not built!
Categories
(Core Graveyard :: RDF, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: manelix2000, Unassigned)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
I have a xul file with one "element" with a simple template and a RDF datasource
with one resource with a single property. When I click on a button (into the
xul) I load de datasource into the element but the anonymous content is not
build. Works for mozilla up to 1.6 and not with 1.7.x
------------- begin xul (content) ---------------
<xul:hbox id="element" datasources="rdf:null" style="border: 1px solid" flex="1">
<xul:template>
<xul:rule>
<xul:conditions>
<xul:content uri="?uri"/>
<xul:triple subject="?uri" predicate="http://www.foo.com/resources#property"
object="?property"/>
</xul:conditions>
<xul:action>
<xul:textbox uri="?uri" value="?property"/>
</xul:action>
</xul:rule>
</xul:template>
</xul:hbox>
<xul:button label="click" onclick="init()"/>
----------- end xul ----------------
simple, isn't it?
and the "init" function is as follows:
--- begin init ---
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var element = document.getElementById('element');
var ref = "http://www.foo.com/resources#Node";
var ds = ... // mozilla in-memory datasource
element.database.AddDataSource(ds);
element.setAttribute("ref",reference);
--- end init ---
and the datasource:
---------- begin datasource --------
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foo="http://www.foo.com/resources#">
<rdf:Description rdf:about="http://www.foo.com/resources#Node">
<foo:property>World Wide Web Consortium</foo:property>
</rdf:Description>
</rdf:RDF>
------------------- end datasource ------------------
the content should be built!
Reproducible: Always
Steps to Reproduce:
1. Load the xul file.
2. Click on "init" button
3.
Actual Results:
content from template not built
Expected Results:
A single textbox should appear on setting the reference.
Has been changed something about the templates?
tx.
Comment 1•21 years ago
|
||
please provide a complete testcase, two files should do, right?
| Reporter | ||
Comment 2•21 years ago
|
||
Comment 3•21 years ago
|
||
works for me on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217.
Firefox 1.0 crashes though, probably bug 236853.
| Reporter | ||
Comment 4•21 years ago
|
||
another testcase! The difference with previous is:
<xul:textbox uri="?uri" value="?value"/>
from the <action> element from template instead of
<xul:textbox uri="?value" value="?value"/>
now the mozilla/firefox don't crash but the content is not built! any ideas?
Comment 5•21 years ago
|
||
The container and member variables (the two uri attributes) must be different.
Templates may only be used to iterate over a set of results.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 6•21 years ago
|
||
Templates *MAY* only be used to iterate over a set of results.
may? what means "may"? I mean, why I cannot use a template to show the value of
a single property of a resource? This is the "concept" of template, isn't it? I
set the rules and if the RDF match the rules the content is built. These rules
could perfectly say that there is only one triple, subject-property-object,
without subject been a container and without subject having children (in fact,
properties are "children" of type RDFLiteral) so I don't understand why I cannot
display single properties of resources using templates!
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•