<https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#constructWhere>
        a       <https://w3id.org/atomgraph/linkeddatahub#Content> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h4 id=\"constructWhere\">CONSTRUCT WHERE</h4>\n\n<p>A short form for the CONSTRUCT query form is provided for the case where the template and the pattern are the same and the pattern is just a basic graph pattern (no <code>FILTER</code>s and no complex graph patterns are allowed in the short form). The keyword <code>WHERE</code> is required in the short form.</p>\n<p>The following two queries are the same; the first is a short form of the second.</p>\n<pre xml:space=\"preserve\"><code class=\"language-sparql\">PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;\nCONSTRUCT WHERE { ?x foaf:name ?name } \n</code></pre>\n<pre xml:space=\"preserve\"><code class=\"language-sparql\">PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;\n\nCONSTRUCT { ?x foaf:name ?name } \nWHERE\n{ ?x foaf:name ?name }\n</code></pre></div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> ;
        <http://www.w3.org/ns/prov#wasDerivedFrom>
                <https://www.w3.org/TR/sparql11-query/#constructWhere> .

<https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#this>
        a                          <https://kgdev.net/ns#Definition> , <https://w3id.org/atomgraph/linkeddatahub#Content> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h3 id=\"this\">CONSTRUCT</h3>\n\n<p>The <code>CONSTRUCT</code> query form returns a single RDF graph specified by a graph template. The result is an RDF graph formed by taking each query solution in the solution sequence, substituting for the variables in the graph template, and combining the triples into a single RDF graph by set union.</p>\n<p>If any such instantiation produces a triple containing an unbound variable or an illegal RDF construct, such as a literal in subject or predicate position, then that triple is not included in the output RDF graph. The graph template can contain triples with no variables (known as ground or explicit triples), and these also appear in the output RDF graph returned by the CONSTRUCT query form.</p>\n<pre xml:space=\"preserve\"><code class=\"language-turtle\">@prefix  foaf:  &lt;http://xmlns.com/foaf/0.1/&gt; .\n\n_:a    foaf:name   \"Alice\" .\n_:a    foaf:mbox   &lt;mailto:alice@example.org&gt; .\n</code></pre>\n<pre xml:space=\"preserve\"><code class=\"language-sparql\">PREFIX foaf:    &lt;http://xmlns.com/foaf/0.1/&gt;\nPREFIX vcard:   &lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt;\nCONSTRUCT   { &lt;http://example.org/person#Alice&gt; vcard:FN ?name }\nWHERE       { ?x foaf:name ?name }\n</code></pre>\n<p>creates vcard properties from the FOAF information:</p>\n<pre xml:space=\"preserve\"><code>@prefix vcard: &lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt; .\n\n&lt;http://example.org/person#Alice&gt; vcard:FN \"Alice\" .\n</code></pre></div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> ;
        <http://www.w3.org/ns/prov#wasDerivedFrom>
                <https://www.w3.org/TR/sparql11-query/#construct> ;
        <https://schema.org/name>  "CONSTRUCT" .

<https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#accessingRdfGraphs>
        a       <https://w3id.org/atomgraph/linkeddatahub#Content> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h4 id=\"accessingRdfGraphs\">Accessing Graphs in the RDF Dataset</h4>\n\n<p>Using <code>CONSTRUCT</code>, it is possible to extract parts or the whole of graphs from the target RDF dataset. This first example returns the graph (if it is in the dataset) with IRI label <code>http://example.org/aGraph</code>; otherwise, it returns an empty graph.</p>\n<pre xml:space=\"preserve\"><code class=\"language-sparql\">CONSTRUCT { ?s ?p ?o } WHERE { GRAPH &lt;http://example.org/aGraph&gt; { ?s ?p ?o } . }\n</code></pre>\n<p>The access to the graph can be conditional on other information. For example, if the default graph contains metadata about the named graphs in the dataset, then a query like the following one can extract one graph based on information about the named graph:</p>\n<pre xml:space=\"preserve\"><code class=\"language-sparql\">PREFIX  dc: &lt;http://purl.org/dc/elements/1.1/&gt;\nPREFIX app: &lt;http://example.org/ns#&gt;\nPREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;\n\nCONSTRUCT { ?s ?p ?o } WHERE\n {\n   GRAPH ?g { ?s ?p ?o } .\n   ?g dc:publisher &lt;http://www.w3.org/&gt; .\n   ?g dc:date ?date .\n   FILTER ( app:customDate(?date) &gt; \"2005-02-28T00:00:00Z\"^^xsd:dateTime ) .\n }\n</code></pre>\n<p>where <code>app:customDate</code> identifies an <a href=\"../../expressions/#extensionFunctions\" shape=\"rect\">extension function</a> to turn the date format into an <code>xsd:dateTime</code> RDF term.</p></div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> ;
        <http://www.w3.org/2000/01/rdf-schema#seeAlso>
                <https://kgdev.net/specifications/sparql11-query/expressions/#extensionFunctions> ;
        <http://www.w3.org/ns/prov#wasDerivedFrom>
                <https://www.w3.org/TR/sparql11-query/#accessingRdfGraphs> .

<https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#templatesWithBNodes>
        a       <https://w3id.org/atomgraph/linkeddatahub#Content> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h4 id=\"templatesWithBNodes tempatesWithBNodes\">Templates with Blank Nodes</h4>\n\n<p>A template can create an RDF graph containing blank nodes. The blank node labels are scoped to the template for each solution. If the same label occurs twice in a template, then there will be one blank node created for each query solution, but there will be different blank nodes for triples generated by different query solutions.</p>\n<pre xml:space=\"preserve\"><code class=\"language-turtle\">@prefix  foaf:  &lt;http://xmlns.com/foaf/0.1/&gt; .\n\n_:a    foaf:givenname   \"Alice\" .\n_:a    foaf:family_name \"Hacker\" .\n\n_:b    foaf:firstname   \"Bob\" .\n_:b    foaf:surname     \"Hacker\" .\n</code></pre>\n<pre xml:space=\"preserve\"><code class=\"language-sparql\">PREFIX foaf:    &lt;http://xmlns.com/foaf/0.1/&gt;\nPREFIX vcard:   &lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt;\n\nCONSTRUCT { ?x  vcard:N _:v .\n            _:v vcard:givenName ?gname .\n            _:v vcard:familyName ?fname }\nWHERE\n {\n    { ?x foaf:firstname ?gname } UNION  { ?x foaf:givenname   ?gname } .\n    { ?x foaf:surname   ?fname } UNION  { ?x foaf:family_name ?fname } .\n }\n</code></pre>\n<p>creates vcard properties corresponding to the FOAF information:</p>\n<pre xml:space=\"preserve\"><code>@prefix vcard: &lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt; .\n\n_:v1 vcard:N         _:x .\n_:x vcard:givenName  \"Alice\" .\n_:x vcard:familyName \"Hacker\" .\n\n_:v2 vcard:N         _:z .\n_:z vcard:givenName  \"Bob\" .\n_:z vcard:familyName \"Hacker\" .\n</code></pre>\n<p>The use of variable <code>x</code> in the template, which in this example will be bound to blank nodes with labels <code>_:a</code> and <code>_:b</code> in the data, causes different blank node labels (<code>_:v1</code> and <code>_:v2</code>) in the resulting RDF graph.</p></div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> ;
        <http://www.w3.org/ns/prov#wasDerivedFrom>
                <https://www.w3.org/TR/sparql11-query/#templatesWithBNodes> .

<https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#SolModandCONSTRUCT>
        a       <https://w3id.org/atomgraph/linkeddatahub#Content> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h4 id=\"SolModandCONSTRUCT\">Solution Modifiers and CONSTRUCT</h4>\n\n<p>The solution modifiers of a query affect the results of a <code>CONSTRUCT</code> query. In this example, the output graph from the <code>CONSTRUCT</code> template is formed from just two of the solutions from graph pattern matching. The query outputs a graph with the names of the people with the top two sites, rated by hits. The triples in the RDF graph are not ordered.</p>\n<pre xml:space=\"preserve\"><code class=\"language-turtle\">@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .\n@prefix site: &lt;http://example.org/stats#&gt; .\n\n_:a foaf:name \"Alice\" .\n_:a site:hits 2349 .\n\n_:b foaf:name \"Bob\" .\n_:b site:hits 105 .\n\n_:c foaf:name \"Eve\" .\n_:c site:hits 181 .\n</code></pre>\n<pre xml:space=\"preserve\"><code class=\"language-sparql\">PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;\nPREFIX site: &lt;http://example.org/stats#&gt;\n\nCONSTRUCT { [] foaf:name ?name }\nWHERE\n{ [] foaf:name ?name ;\n     site:hits ?hits .\n}\nORDER BY desc(?hits)\nLIMIT 2\n</code></pre>\n<pre xml:space=\"preserve\"><code>@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .\n_:x foaf:name \"Alice\" .\n_:y foaf:name \"Eve\" .\n</code></pre></div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> ;
        <http://www.w3.org/ns/prov#wasDerivedFrom>
                <https://www.w3.org/TR/sparql11-query/#SolModandCONSTRUCT> .

<https://kgdev.net/specifications/sparql11-query/QueryForms/construct/>
        a       <https://www.w3.org/ns/ldt/document-hierarchy#Item> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>
                <https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#this> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2>
                <https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#templatesWithBNodes> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3>
                <https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#accessingRdfGraphs> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4>
                <https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#SolModandCONSTRUCT> ;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_5>
                <https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#constructWhere> ;
        <http://purl.org/dc/terms/modified>
                "2023-07-10T15:12:58.229Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        <http://purl.org/dc/terms/title>
                "CONSTRUCT" ;
        <http://rdfs.org/sioc/ns#has_container>
                <https://kgdev.net/specifications/sparql11-query/QueryForms/> ;
        <http://www.w3.org/ns/prov#wasDerivedFrom>
                <https://www.w3.org/TR/sparql11-query/#construct> ;
        <http://xmlns.com/foaf/0.1/primaryTopic>
                <https://kgdev.net/specifications/sparql11-query/QueryForms/construct/#this> .
