Nauman,

you might find this XSLT transformation useful -- it groups and sorts
resource descriptions in RDF/XML:
https://github.com/Graphity/graphity-client/blob/master/src/main/webapp/static/org/graphity/client/xsl/group-sort-triples.xsl

On Tue, Mar 31, 2015 at 6:02 PM, Stian Soiland-Reyes <st...@apache.org> wrote:
> You would probably want to SELECT ?title ?brand etc. in the SPARQL
> query, then you can use XSLT to rewrite the XML based on <binding>,
> rather than try to parse and group the triples, which would become
> much harder in XSLT.
>
> http://www.w3.org/TR/rdf-sparql-XMLres/
> http://www.w3.org/standards/xml/transformation
>
>
> On 30 March 2015 at 15:03, Nauman Ramzan <nauman.emalla...@gmail.com> wrote:
>> See right now i am receiving topples
>> e.g
>>
>>> <example.com/product/1> <example.com/prop/title> iPhone
>>> <example.com/product/1> <example.com/prop/brand> Apple
>>> <example.com/product/1> <example.com/prop/condition> New
>>> <example.com/product/1> <example.com/prop/description> Smart phone
>>> <example.com/product/1> <example.com/prop/keypoints> touch screen, smart
>>> phone
>>
>>
>> I want to get this data in this formate
>>
>>> <example.com/product/1>
>>> <example.com/prop/title> iPhone
>>> <example.com/prop/brand> Apple
>>> <example.com/prop/condition> New
>>> <example.com/prop/description> Smart phone
>>> <example.com/prop/keypoints> touch screen, smart phone
>>> <example.com/product/2>
>>> <example.com/prop/title> iPhone
>>> <example.com/prop/brand> Apple
>>> <example.com/prop/condition> New
>>> <example.com/prop/description> Smart phone
>>> <example.com/prop/keypoints> touch screen, smart phone
>>
>> and so on, Purpose of this process is to read data block by block.
>>
>> Regards
>>
>> On Mon, Mar 30, 2015 at 4:38 PM, Andy Seaborne <a...@apache.org> wrote:
>>
>>> On 29/03/15 22:11, Nauman Ramzan wrote:
>>>
>>>> Hi all !
>>>> I just want to know how can I formate
>>>> Fuseki response ?
>>>> Like
>>>> <item1>
>>>>    <title> mobile
>>>>    <brand> apple
>>>> <item2>
>>>>    <title> mobile
>>>>    <brand> apple
>>>> And so on like turtle
>>>> How can i apply these formats ?
>>>>
>>>> Regards
>>>> Nauman
>>>>
>>>>
>>> That's XML?
>>>
>>> You could apply XSLT to the XML results form of SELECT results.
>>> You can even get the server to add the stylesheet line with &stylesheet=
>>> That's how HTML output is done.
>>>
>>>         Andy
>>>
>>>
>
>
>
> --
> Stian Soiland-Reyes
> Apache Taverna (incubating), Apache Commons RDF (incubating)
> http://orcid.org/0000-0001-9842-9718

Reply via email to