Ok thanks, I now understand the question better.
The problem of generating rdf:Lists with SPARQL has been observed by other users too and is an inherent limitation of SPARQL. It cannot be done in general, although you could write INSERTs for certain list lengths, e.g. produce all BNODE() for each list item up to length of three and then link them together. But even that would be a terrible syntax. One problem is SPARQL’s lack or recursion.
To generate RDF lists or similarly complex structures, you would need to use a scripting language. TopBraid EDG includes JavaScript support from its Script Editor panel, see
where you can produce even the most complex structures and use JavaScript to orchestrate arbitrary SPARQL queries too.
If that’s an option for you, feel free to ask follow-up questions.
Holger