-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Coming from SPARQL, if a sub-expression containing a URI with a lexical representation using a prefix or base definition is extracted, the to_sxp method will use that representation even if the prefix or base definition is no longer included.
Describe the solution you'd like
A method for managing prefix and base definition within an S-Expression (SPARQL-specific) which would recursively update the lexical representations of embedded URIs (including literal datatypes) would be nice.
# Possible refinements
# Adds a prefix declaration to an Array representation of an S-Exp and recursively update the lexical representations of contained URIs
def add_prefix(pfx, uri); end
# Adds a prefix declaration to an Array representation of an S-Exp and recursively update the lexical representations of contained URIs
def add_base(uri); end
# Returns a deep copy of an Array representation of an S-Exp without the specified prefix and removes any lexical representations from included URIs recursively
def remove_prefix(pfx); end
# Returns a deep copy of an Array representation of an S-Exp without the specified base and removes any lexical representations from included URIs recursively
def remove_base(); end
# Returns a deep copy of an Array representation of an S-Exp without any prefix or base declarations.
def clear_prefixes; end
# Return the prefix definitions from an an Array representation of an S-Exp
def prefixes; endAdditional context
See the email thread at https://lists.w3.org/Archives/Public/public-rdf-ruby/2021Dec/0014.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request