• Topic
  • Discussion
  • VOS.VirtSparqlCxmlHead(Last) -- DAVWikiAdmin? , 2017-06-13 05:44:55 Edit WebDAV System Administrator 2017-06-13 05:44:55

    VirtSparqlCxmlHead

    Draft documentation for CXML generation from /sparql endpoint

    Work in progress ...

    • SparqlCxmlDzcsOld?

    -- CarlBlakeley? 29 Sep 2010


    • SparqlCxmlQueriesCollection?

    CXML Generation Routines used by /sparql

    The main Virtuoso/PL procedures used are:

    • DB.DBA.SPARQL_RESULTS_TO_CXML_WRITE
      • Prepares CXML data for a given SPARQL SELECT result set. metas[1] can be tweaked by caller and contain get_keyword style vector of collection attributes.
    • DB.DBA.RDF_TRIPLES_TO_CXML
      • Prepares CXML data for a given SPARQL CONSTRUCT-like dictionary of triples
    • DB.DBA.CXML_CONVERT_FACET_VALUES
      • Calls any value conversion callback functions of all facets for all facet values.
    • DB.DBA.CXML_MAKE_COLLECTION
      • Serializes facets and items into a complete CXML text.
    • DB.DBA.CXML_FACET_OF_COL
      • Returns a facet IRI for the given column name. (Used by DB.DBA.SPARQL_RESULTS_TO_CXML_WRITE)
    • DB.DBA.CXML_FACET_OF_P
      • Returns a facet IRI (facet name) for the given item type and predicate. By default, the facet IRI is equal to the predicate IRI.
    • DB.DBA.CXML_FACET_ATTRS
      • Given a facet IRI, the function returns a vector of attributes of the facet.
      • Attributes currently recognized by the CXML serializer are:
        • @Name (the fragment from the facet / predicate IRI is used if not specified)
        • @Type (default is 'String', values are standard CXML types or one of 'Item/Description', 'Item/Related', 'Item/@Img', 'Item/@Id', 'Item/@Href', 'Item/@Name' )
        • @Format
        • d1p1:IsFilterVisible?
        • d1p1:IsMetaDataVisible?
        • d1p1:IsWordWheelVisible?

    Default CXML Output

    The default settings for the CXML generation include the following defaults:

    • FacetCategory attributes
      • Name
        • Defaults to a short property name, without a prefix. e.g. Predicate http://www.openlinksw.com/campsites/schema#distance_from_calais_km becomes a FacetCategory with Name="distance_from_calais_km"
      • Type
        • Defaults to CXML type "String"
      • IsFilterVisible, IsMetaDataVisible, IsWordWheelVisible
        • All default to "true"
    • Facet attributes
      • Name
        • As with the FacetCategory Name attribute, defaults to a short property name.
      • Type
        • As with the FacetCategory Type attribute, defaults to "String".
    • Item attributes
      • Name
        • Defaults to the URI of the entity described by the Item element
      • Href
        • Defaults to the URI of the entity described by the Item element
      • Img
        • Defaults to "#10"
    • Items attributes
      • ImgBase
        • Defaults to "/pivot_collections/default_pivot_collection_files/n3ijndyb.ian.xml"

    Tailoring the CXML Output

    The CXML output can be tailored by settings in graph <http://www.openlinksw.com/schemas/virtcxml#>. The graph can also be referred to by its short name virtcxml: which is declared in table DB.DBA.SYS_XML_PERSISTENT_NS_DECL.