Menu

ResModel::writeRdfToString

Help
2004-12-25
2013-03-14
  • ISHITOYA Kentaro

    Hi all.
    I found typo.

    rdfapi-php/api/resModel/ResModel.php:782

    function writeRdfToString()
    {
        $this->model-writeRdfToString();   
    }

    it works modified it to
    $this->model->writeRdfToString();

    thank you for providing this great library.

     
    • ISHITOYA Kentaro

      Sorry and this code is needed to display cllectly
      if no default_prefixes specified this code will halt
      rdfapi-php/api/syntax/RdfSerializer : 83
      foreach($default_prefixes as $key => $value){
          $this->addNamespacePrefix($key,$value);
      }

      so I fix this to
      if($default_prefixes){
          foreach($default_prefixes as $key => $value){
              $this->addNamespacePrefix($key,$value);
          }
      }

       
      • Nobody/Anonymous

        Hi,
        you are right. If no default_prefixes are specified your code will halt but they are always defined in constants.php. Maybe you have not enabled globals in your php.ini. If you don't want to use the default_prefixes array please comment out the prefixes in contants.php.

        change:
        rdfapi-php/api/constants.php : 331

        $default_prefixes = array(
           XML_NAMESPACE_PREFIX => XML_NAMESPACE_URI,   
           RDF_NAMESPACE_PREFIX => RDF_NAMESPACE_URI,
           RDF_SCHEMA_PREFIX => RDF_SCHEMA_URI,
           'xsd'  => 'http://www.w3.org/2001/XMLSchema#',
           OWL_PREFIX => OWL_URI
        );

        to

        $default_prefixes = array(
           //XML_NAMESPACE_PREFIX => XML_NAMESPACE_URI,   
           //RDF_NAMESPACE_PREFIX => RDF_NAMESPACE_URI,
           //RDF_SCHEMA_PREFIX => RDF_SCHEMA_URI,
           //'xsd'  => 'http://www.w3.org/2001/XMLSchema#',
           //OWL_PREFIX => OWL_URI
        );

        Regards,
        Tobias

         
    • ISHITOYA Kentaro

      hi.
      I had changed there, and it works.
      with out my change.

      thank you!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.