1 Reply Latest reply on Jul 12, 2007 11:16 PM by Mannamal-Oracle

    Results with alias namespace

    586185
      Hello;

      The results of a query is present with the long URL systax in the manner;
      m
      -----------------------------------------------------
      http://www.example.org/family/John

      If the query is planned like this;

      SELECT m
      FROM TABLE(SDO_RDF_MATCH(
      '(?m rdf:type :Male)',
      SDO_RDF_Models('family'),
      SDO_RDF_RuleBases('RDFS'),
      SDO_RDF_Aliases(SDO_RDF_Alias('','http://www.example.org/family/')),
      null));

      Is a posibility to return the results with the <b>alias shortname</b> of the namespace;

      m
      -------
      :John

      Best

      Isidro
        • 1. Re: Results with alias namespace
          Mannamal-Oracle
          This can be done by using a PL/SQL substring function to trim the results. For this alias, since you know the length of this alias. You could write the query as follows:

          SELECT substr(m, 31)
          FROM TABLE(SDO_RDF_MATCH(
          '(?m rdf:type :Male)',
          SDO_RDF_Models('family'),
          SDO_RDF_RuleBases('RDFS'),
          SDO_RDF_Aliases(SDO_RDF_Alias('','http://www.example.org/family/')),
          null));