Skip to content
22 changes: 13 additions & 9 deletions shacl12-node-expr/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -893,12 +893,13 @@ <h3>List Parameter Functions</h3>
<p>
Note that some <a>named parameter functions</a> &mdash; such as <code>shnex:IntersectionExpression</code> &mdash;
also use a <a>SHACL list</a> as an object of the <a>key parameter</a>, similar to <a>list parameter functions</a> which always have a <a>SHACL list</a> as the object of their <a>list parameter property</a>.
However, these may produce more than one <a>output nodes</a>, and also accept lists as input nodes.
However, these may produce more than one <a>output node</a>, and also accept lists as input nodes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
However, these may produce more than one <a>output node</a>, and also accept lists as input nodes.
However, these may produce more than one <a>output node</a>, and also accept a list of input nodes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it accept a list of lists? I guess not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @robert-david I think you are looking at a different part of the spec than this PR is about.

The PR is about ListExpressions that are written as plain RDF lists in TTL, such as ( 1 2 3 )

The line you have highlighted is about the general architecture of Node Expressions, which can either be NamedParameterFunctions or ListParameterFunctions.

The example mentioned in this paragraph is something like

sh:values [
    shnex:intersection (
        [ shnex:pathValues ex:children ]
        [ shnex:pathValues ex:friends ]
    )
]

which is one example where a named parameter function can take other lists as its input - here the list containing the two pathValues expressions.

So unless I am missing something, this is neither incorrect nor related to the PR.

</p>
<p>
The following example uses multiple (imaginary) <a>list parameter functions</a> &mdash;
<code>ex:coalesce</code> and <code>ex:concat</code> &mdash; to compute the <code>ex:displayName</code>
of a person as either the value of <code>ex:fullName</code> or (if that doesn't exist)
The following example uses two <a>list parameter functions</a> &mdash;
the (hypothetical) <code>ex:coalesce</code> and the SPARQL-based <code>sparql:concat</code> &mdash;
to compute the <code>ex:displayName</code>
of a person either as the value of <code>ex:fullName</code> or (if that doesn't exist)
as a concatenation of <code>ex:firstName</code>, a space, and <code>ex:lastName</code>.
</p>

Expand All @@ -917,9 +918,9 @@ <h3>List Parameter Functions</h3>
shnex:pathValues ex:fullName ;
]
[
ex:concat (
sparql:concat (
[ shnex:pathValues ex:firstName ] # Path values expression with at most one value
" " # A constant literal expression
" " # A constant literal expression
[ shnex:pathValues ex:lastName ] # Path values expression with at most one value
)
]
Expand Down Expand Up @@ -1071,6 +1072,7 @@ <h3>List Expressions</h3>
<tr>
<td><b><code>rdf:first</code></b></td>
<td>
MUST be a <a>literal</a> or an <a>IRI</a>.
</td>
<td>
The first member of the list.
Expand All @@ -1079,10 +1081,11 @@ <h3>List Expressions</h3>
<tr>
<td><b><code>rdf:rest</code></b></td>
<td>
Must be a <a>well-formed</a> <a>SHACL list</a>.
Must be a <a>well-formed</a> <a>SHACL list</a>, where each <a>member</a>
is either a <a>literal</a> or an <a>IRI</a>.
</td>
<td>
The rest of the list, e.g. <code>rdf:nil</code>.
The rest of the list, e.g., <code>rdf:nil</code>.
</td>
</tr>
</tbody>
Expand All @@ -1092,7 +1095,8 @@ <h3>List Expressions</h3>
<div class="def" id="ListExpression-evaluation">
<div class="def-header">EVALUATION OF LIST EXPRESSIONS</div>
<p>
The <a>output nodes</a> of a <a>list expression</a> are the <a>members</a> of the <a>SHACL list</a>.
The <a>output nodes</a> of a <a>list expression</a> are the <a>members</a> of the <a>list expression</a>,
in the same order as in the list.
</p>
</div>
<p><em>The remainder of this section is informative.</em></p>
Expand Down