Re: questions about syntax document and n-triples

>>>"Peter F. Patel-Schneider" said:
> 1/  In several places the syntax document says to generate a blank node
> identifier.  However, I can find no method for doing so.  Also I do not see
> any requirement that the generated identifier needs to be fresh.

I'll expand this in the next draft on the detail of this generation
in the next draft.  Fresh: yes.   The operation is to generate a new
graph-local identifier that can be distinguished from any other.

There are two syntaxes involved here that serialize such identifiers
(N-Triples and RDf/XML), and they have restrictions on the syntax
used - sequences of characters.  This does not apply to the blank
node identifier in the graph, just in the serialization.

I hope the RDF Concepts draft explains how blank node identifiers are
used in syntaxes, even though they are not used explicitly in the
graph itself.  The syntax WD points at

  [[a blank node identifier, which is a local identifier that can be
  distinguished from all URIs and literals. When graphs are merged,
  their blank nodes must be kept distinct if meaning is to be
  preserved; this may call for re-allocation of blank node
  identifiers.]]

  http://www.w3.org/TR/rdf-concepts/#dfn-blank-node-id

If this is not sufficient, let us know.

> 2/ The n-triples spec requires that nodeIDs in triples be formed from
> names, which goes against the common (in WebOnt) practice of using _:1 as a
> nodeID.

That's always been both illegal N-Triples and N3.

N-Triples
  [[
       nodeID  ::=  '_:' name
       name  ::=  [A-Za-z][A-Za-z0-9]*

  ]]
  --  http://www.w3.org/TR/rdf-testcases/#nodeID

N3:
  [[     
     qname  :=      prefix : localname

     prefix  :=     alpha
                    prefix alphanumeric
                    _ (special ntuples hack. Everything in _
                    namespace is implictly existentially qualified at
                    the outermost scope) 

     localname := alpha 
                  localname alphanumeric 

     alpha := any letter a-z or A-Z case sensitive

     alphanumeric :=  alpha
                      any digit 0-9
                      _ (the underscore)

  ]]
  -- http://www.w3.org/DesignIssues/Notation3.html#localname


One reason is it is meant to look like an XML QName formed of a
namespace prefix (_, here meaning blank node) and a local name.
XML local names are not allowed to start with numbers.

It is in particular confusing when written in N3 with the (legal) :_1
which could be used when with @prefix : <rdf namespace> standing in
for rdf:_1

Dave

Received on Monday, 2 December 2002 07:28:14 UTC