Converts a prefix map to a SPARQL template result with PREFIX declarations Deduplicates prefixes by filtering out those that are:

  • Already declared in an existing query (if provided)
  • Automatically added by the SPARQL builder (rdf, xsd)
  • Parameters

    • prefixes: Prefixes

      Map of prefix names to namespace URIs

    • OptionalexistingQuery: string

      Optional existing query string to check for already-declared prefixes

    Returns SparqlTemplateResult

    SparqlTemplateResult with PREFIX declarations for use with .prologue``