Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve N3Writer Support For Gist Style Guide Instances #302

Open
svirgilgood opened this issue Aug 16, 2022 · 4 comments
Open

Improve N3Writer Support For Gist Style Guide Instances #302

svirgilgood opened this issue Aug 16, 2022 · 4 comments

Comments

@svirgilgood
Copy link
Contributor

According to the Gist Style guide (and other conventions), Instance local names start with an underscore, the N3Writer currently expects all prefixed local names to start with an alphabetic character.

Is there a reason we wouldn't want underscores to be recognized by this Regex?

This issue has been addressed in this pr

@jeswr
Copy link
Collaborator

jeswr commented Aug 16, 2022

Is there a reason we wouldn't want underscores to be recognized by this Regex?

Underscores are not allowed at the start of a prefix according to the turtle production grammar and I don't imagine any other grammars for the RDF syntaxes supported by this library would be different (though if they are any please correct me!).

@svirgilgood
Copy link
Contributor Author

svirgilgood commented Aug 16, 2022

I am sorry for the confusion: its an underscore at the start of a local name. For example: https://example.org/_instance_1.
I think the N3Writer should produce the following:

@prefix ex: <https://example.org/> .

ex:_instance_1 a ex:ExampleClass .

But with the current implementation the writer would produce the following:

@prefix ex: <https://example.org/> . 

<https://example.org/_instance_1>  a ex:ExampleClass .

@TallTed
Copy link
Contributor

TallTed commented Aug 16, 2022

@e2dubba --

Both your "should" and "current" examples include the invalid @prefix <https://example.org/> .

I'm guessing that was intended to be @prefix : <https://example.org/> . but I'm not certain.

This error makes me wonder if there are other errors in your comment, which I suggest you review and revise to be certain it's saying what you intend.

@svirgilgood
Copy link
Contributor Author

@TallTed, thank you for pointing out the typos in my comment. I had forgotten to include the prefix (the very thing we are talking about). But it is corrected now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants