Perform X3D Ontology query X3dHelloWorldQuery_04.rq using examples/HelloWorld.ttl to produce output file X3dHelloWorldQuery_04.rq.txt: =========================== PREFIX rdf: PREFIX rdfs: PREFIX owl: PREFIX xsd: PREFIX x3d: PREFIX x3do: # X3dHelloWorldQuery_04.rq Query HelloWorld.ttl to show contained geometry, appearance, material and texture field SFNode values within each Shape node. ############################################### SELECT ?shapeNode ?geometryField ?appearanceField ?materialField ?textureField WHERE { ?shape rdf:type x3do:Shape . OPTIONAL { ?shape x3do:hasGeometry ?geometry . } OPTIONAL { ?shape x3do:hasAppearance ?appearance . } OPTIONAL { ?appearance x3do:hasMaterial ?material . } OPTIONAL { ?appearance x3do:hasTexture ?texture . } BIND (strafter(xsd:string(?shape), "#") AS ?shapeNode) BIND (strafter(xsd:string(?geometry),"#") AS ?geometryField) BIND (strafter(xsd:string(?appearance),"#") AS ?appearanceField) BIND (strafter(xsd:string(?material),"#") AS ?materialField) BIND (strafter(xsd:string(?texture),"#") AS ?textureField) } ORDER BY ASC(?shapeNode) ############################################### --------------------------------------------------------------------------------------------------------------------- | shapeNode | geometryField | appearanceField | materialField | textureField | ===================================================================================================================== | "Shape_2_3_2_1" | "Sphere_2_3_2_1_1" | "Appearance_2_3_2_1_2" | "MaterialLightBlue" | "ImageCloudlessEarth" | | "Shape_2_3_3_1" | "TextMessage" | "Appearance_2_3_3_1_2" | "MaterialLightBlue-USE-1" | | ---------------------------------------------------------------------------------------------------------------------