Closed Bug 227309 Opened 21 years ago Closed 1 month ago

NC:parseType should be replaced with rdf:datatype

Categories

(Core Graveyard :: RDF, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: bob, Assigned: mozilla)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7

Having both an NC:parseType attribute and PCDATA for the various date elements
doesn't fit into the RDF data model, so an RDF parser like arp reports errors.
See bug 227307 for information on using arp to validate RDF. 


Reproducible: Always

Steps to Reproduce:
1. I used a Mozwho extension to save the bookmark RDF to a file
2. Tried to validate the RDF in the file with arp
3.

Actual Results:  
Error messages for every element that had both PCDATA content and a NC:parseType
attribute.

Expected Results:  
You could just drop the parseType attribute (it's not on the other elements) or
make the date child elements attributes of the Bookmark element instead, like
URL, Name, etc. Either way, make sure the RDF that gets created is considered
valid by an RDF parser.
Since Mozilla isn't capable of exporting the bookmarks in an RDF file (see bug
177886), isn't this a bug in mozwho ?
Bob, can you attach a sample of the MozWho output?

jhermans: this is probably a serializer bug, not MozWho.
This is not actually a problem with the bookmarks datasource in particular,
although that does demonstrate the problem.  Here's what an entry in the
serialized bookmarks datasource looks like:

 <NC:Bookmark about="rdf:#$R1hiH"
                   NC:Name="SomeURL"
                   NC:URL="http://www.foo.org/"
                   NS1:LastCharset="UCS2">
    <NC:BookmarkAddDate NC:parseType="Date">Thu Jan 15 08:07:26 EST 2004
+938491</NC:BookmarkAddDate>
  </NC:Bookmark>

The reporter is incorrect in asserting that the NC:parseType can be simply
dropped -- the data typing is there for a reason.  The actual bug is that we
should convert our data typing system to use the version endorsed by the M&S,
using RDF:datatype.  (The reason for NC:parseType is historical: the
RDF:datatype solution hadn't solidifed yet in the spec.)  Note that replacing
the NC:parseType="Date" attribute with the following:
    RDF:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
will fix the validation error.

Confirming and resummarizing; adding as a spec violation dependency.

References:
http://www.w3.org/TR/rdf-concepts/#section-Datatypes-intro
http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-datatyped-literals
Blocks: 11650
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
Summary: lose PCDATA or NC:parseType attr from bookmark date elements → NC:parseType should be replaced with rdf:datatype
Am I right in saying that, in addition to #3's attribute change, the format of the literal would also need to be changed to ISO 8601 in order to be valid dateTime typed property?

Also, since this doesn't seem to be an active bug, does anyone have any references people could follow up, if they have an interest in fixing serialisation?
QA Contact: rdf
Product: Core → Core Graveyard
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.