GetTarget() return null for empty literals.

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
14 years ago
6 months ago

People

(Reporter: aperez, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

From javascript, datasource.GetTarget(resource, emptyproperty, true) returns
null instead of an empty literal when the resource is described as this:

<ex:MyClass about="urn:myresource">
  <ex:myproperty/>
</ex:MyClass>

The problem also exists is the resource is described as this:

<ex:MyClass about="urn:myresource">
  <ex:myproperty></ns:myproperty>
</ex:MyClass>


Reproducible: Always
Steps to Reproduce:
var res = rdf.GetResource("urn:myresource");
var prop = rdf.GetResource("http://www.example.com/myproperty");
var target = ds.GetTarget(res, prop, true);
Actual Results:  
target === null

Expected Results:  
a Components.interfaces.nsIRDFLiteral whose Value attribute is the empty string
(I doubt if it could be null, undefined or the empty string, but I belive it
should be the empty string.)

Discussion about empty elements in www-rdf-comments mailing list:

  http://lists.w3.org/Archives/Public/www-rdf-comments/2001JanMar/0128.html


W3C RDF Issue tracking (contains resolution):

  http://www.w3.org/2000/03/rdf-tracking/#rdfms-empty-property-elements


W3C test cases for empty property elements:

  http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/

Comment 1

14 years ago
This should be trivial to fix.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Updated

14 years ago
Assignee: nobody → axel
Blocks: 11650
Status: ASSIGNED → NEW

Comment 2

2 years ago
Sorry for not getting this fixed back when. Today, we're not going to take changes like this to RDF anymore, so I'm resolving this WONTFIX.
Assignee: axel → nobody
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX

Updated

6 months ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.