Subject: [xsl] Streaming and grouping in XSLT 3.0 From: "Martynas Jusevičius martynas@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 21 Mar 2017 10:43:51 -0000 |
Hi all, fistly I must admit I'm a complete novice when it comes to XSLT 3.0 and streaming (though not XSLT 2.0). My use case is as follows -- a triplestore returns streaming RDF/XML (omitting namespaces): <rdf:RDF> <rdf:Description rdf:about="http://dbpedia.org/resource/Copenhagen"> <dct:title>Copenhagen</dct:title> </rdf:Description> ... <rdf:Description rdf:about="http://dbpedia.org/resource/Copenhagen"> <dbo:country rdf:resource="http://dbpedia.org/resource/Denmark"/> </rdf:Description> ... </rdf:RDF> Since it's streaming, every resource description only contains one property. It's not convenient, so during the first pass I group the descriptions by subject using [1]: <rdf:RDF> <rdf:Description rdf:about="http://dbpedia.org/resource/Copenhagen"> <dct:title>Copenhagen</dct:title> <dbo:country rdf:resource="http://dbpedia.org/resource/Denmark"/> </rdf:Description> ... </rdf:RDF> Then as the second pass I do the main transformation to XHTML, which could produce something like using [2][3] <fieldset> <label>Title</title> <input type="text" value="Copenhagen"/> <label>Country</title> <input type="text" value="http://dbpedia.org/resource/Denmark"/> ... </fieldset> where fieldsets represent resources, and labels/inputs represent properties/values. Now my question is, how do I even begin analyzing the streamability of this approach in XSLT 3.0? I guess my main concern is that such grouping would not be streamable, but maybe there are other solutions? Thanks. Martynas [1] https://github.com/AtomGraph/Web-Client/blob/master/src/main/webapp/static/com/atomgraph/client/xsl/group-sort-triples.xsl [2] https://github.com/AtomGraph/Web-Client/blob/master/src/main/webapp/static/com/atomgraph/client/xsl/bootstrap/2.3.2/layout.xsl [3] https://github.com/AtomGraph/Web-Client/blob/master/src/main/webapp/static/com/atomgraph/client/xsl/bootstrap/2.3.2/imports/default.xsl
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSLT docset for Dash app?, David Sewell dsewell | Thread | Re: [xsl] Streaming and grouping in, Martin Honnen martin |
[xsl] XSLT docset for Dash app?, David Sewell dsewell | Date | Re: [xsl] Streaming and grouping in, Martin Honnen martin |
Month |