[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Streaming and grouping in XSLT 3.0

Subject: 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
 Streaming and grouping in XSLT 3.0
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.