Skip to content

Characters allowed in BNodes names in Ntriples #192

@MaillPierre

Description

@MaillPierre

I am confused about the syntax tests for NTriples nt-syntax-bad-bnode-01 and nt-syntax-bad-bnode-02.

In those two negative tests, a parser must not accept any blank node using a label containing a colon. However, the RDF1.1 NTriples grammar rules for blank node labels are as such:

BLANK_NODE_LABEL 	::= 	'_:' (PN_CHARS_U | [0-9]) ((PN_CHARS | '.')* PN_CHARS)?
PN_CHARS_BASE 	::= 	[A-Z] | [a-z] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x02FF] | [#x0370-#x037D] | [#x037F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
PN_CHARS_U 	::= 	PN_CHARS_BASE | '_' | ':'
PN_CHARS 	::= 	PN_CHARS_U | '-' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040]

According to the grammar, BLANK_NODE_LABEL can be resolved as '_:'PN_CHARS_U with PN_CHARS_U resolving to ':'.

Thus, it seems to me that an NTriples blank node can have a label containing colons. Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions