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

how to preserve BASE? #42

Open
VladimirAlexiev opened this issue Jan 11, 2024 · 0 comments
Open

how to preserve BASE? #42

VladimirAlexiev opened this issue Jan 11, 2024 · 0 comments

Comments

@VladimirAlexiev
Copy link
Contributor

VladimirAlexiev commented Jan 11, 2024

I want to use relative URLs for my subjects (who doesn't!). However:

XSPARQL just ignores them and doesn't output @base.

I post-process the output with this pipeline in Makefile:

%.ttl: xsparql.xsparql %.xml
	xsparql xsparql.xsparql input=$*.xml -f TEMP.ttl > /dev/null
	 riot --syntax ttl --formatted ttl --base "..." TEMP.ttl |\
	 perl -00e '@a=<>; print shift @a; print sort @a' > $*.ttl
	rm TEMP.ttl

It pretty-prints with riot while specifying the base, then finally sorts by "paragraph" (turtle clause)

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

1 participant