[protege-owl] Help me

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[protege-owl] Help me

Anna Lisa Guido

Hi.

I am new about rules, rules engine and query language and I an very confusing.

I find that there are three launguages (but I think that there are more than three) such as SWRL, RDQL, SPARQL.

My questions are:

1. What are the differences between RDQL and SPARQL? (both refers to RDF sintax...)

2. What is the main difference between a rule language and a query language?

Help me.....

 

Anna Lisa

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Help me

Martin O'Connor

There are a several RDF query languages, RDQL and SPARQL being just two
(though SPARQL is by far the most popular). cf.  
http://en.wikipedia.org/wiki/RDF_query_language

SWRL is a rule language, which is built on OWL. cf.
http://protege.cim3.net/cgi-bin/wiki.pl?SWRLLanguageFAQ

The only other OWL-based rule language I am aware of is WRL:
http://www.w3.org/Submission/WRL/

Very roughly speaking, a rule language is normally used to infer new
knowledge, whereas a query language is normally used to extract knowledge.

Martin

Anna Lisa Guido wrote:

> Hi.
>
> I am new about rules, rules engine and query language and I an very
> confusing.
>
> I find that there are three launguages (but I think that there are
> more than three) such as SWRL, RDQL, SPARQL.
>
> My questions are:
>
> 1. What are the differences between RDQL and SPARQL? (both refers to
> RDF sintax...)
>
> 2. What is the main difference between a rule language and a query
> language?
>
> Help me.....
>
>  
>
> *Anna Lisa*
>
>------------------------------------------------------------------------
>
>_______________________________________________
>protege-owl mailing list
>[hidden email]
>https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>  
>

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

[protege-owl] .xml - .owl convertion

jennifer flores
In reply to this post by Anna Lisa Guido

Hi,

I'm trying get an application to convert a .xml file into a .owl file but I can't fid one. If anyone has one or any ideas of how to make it, would be great.


 



Acepta el reto MSN Premium: incluye Antivirus y Firewall de McAffee. Descárgalo y pruébalo 2 meses gratis.
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Help me

Anna Lisa Guido
In reply to this post by Martin O'Connor

Thanks a lot Martin!!!!!




Anna Lisa Guido

From: "Martin O'Connor" <[hidden email]>
Reply-To: User support for the Protege-OWL editor<[hidden email]>
To: User support for the Protege-OWL editor <[hidden email]>
Subject: Re: [protege-owl] Help me
Date: Tue, 10 Oct 2006 15:09:13 -0700

>
>There are a several RDF query languages, RDQL and SPARQL being just two
>(though SPARQL is by far the most popular). cf.
>http://en.wikipedia.org/wiki/RDF_query_language
>
>SWRL is a rule language, which is built on OWL. cf.
>http://protege.cim3.net/cgi-bin/wiki.pl?SWRLLanguageFAQ
>
>The only other OWL-based rule language I am aware of is WRL:
>http://www.w3.org/Submission/WRL/
>
>Very roughly speaking, a rule language is normally used to infer new
>knowledge, whereas a query language is normally used to extract knowledge.
>
>Martin
>
>Anna Lisa Guido wrote:
>
> > Hi.
> >
> > I am new about rules, rules engine and query language and I an very
> > confusing.
> >
> > I find that there are three launguages (but I think that there are
> > more than three) such as SWRL, RDQL, SPARQL.
> >
> > My questions are:
> >
> > 1. What are the differences between RDQL and SPARQL? (both refers to
> > RDF sintax...)
> >
> > 2. What is the main difference between a rule language and a query
> > language?
> >
> > Help me.....
> >
> >
> >
> > *Anna Lisa*
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >protege-owl mailing list
> >[hidden email]
> >https://mailman.stanford.edu/mailman/listinfo/protege-owl
> >
> >Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
> >
> >
>
>_______________________________________________
>protege-owl mailing list
>[hidden email]
>https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] .xml - .owl convertion

Kim,Soonho
In reply to this post by jennifer flores
I am doing the same work, which is converting xml --> owl.
I thought two ways: one is to use XSLT, the other is to use any programming language such as java (parse xml file and write corresponing owl file. I am doing the first one: using XSLT.
 
I found an example of xslt to do it. I hope it might help you to work out.
See the below
-----------------

<?xml version = "1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xml:base="http://www.geneontology.org/owl/">
 
  <xsl:output indent="yes" method="xml"/>

  <xsl:key name="terms" match="term" use="id"/>

  <xsl:template match="/">
    <rdf:RDF
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xmlns="http://www.geneontology.org/owl/#"
  xml:base="http://www.geneontology.org/owl/">
      <owl:Ontology rdf:about=""/>
      <xsl:apply-templates select="obo/term"/>
      <xsl:apply-templates select="obo/typedef"/>
    </rdf:RDF>
  </xsl:template>

  <xsl:template match="term">
    <xsl:element name="owl:Class">
      <xsl:apply-templates mode="rdf-id" select="id"/>
      <rdfs:label>
        <xsl:value-of select="name"/>
      </rdfs:label>
      <xsl:apply-templates select="def/defstr"/>
      <xsl:apply-templates select="is_a"/>
      <xsl:apply-templates select="relationship"/>
      <xsl:if test="count(intersection_of)>0">
        <owl:equivalentClass>
          <owl:Class>
            <owl:intersectionOf>
              <xsl:attribute name="rdf:parseType">Collection</xsl:attribute>
              <xsl:apply-templates select="intersection_of"/>
            </owl:intersectionOf>
          </owl:Class>
        </owl:equivalentClass>
      </xsl:if>
    </xsl:element>
  </xsl:template>

  <xsl:template match="typedef">
    <xsl:choose>
      <xsl:when test="is_transitive=1">
        <xsl:element name="owl:TransitiveProperty">
          <xsl:apply-templates mode="detail" select="."/>
        </xsl:element>
      </xsl:when>
      <xsl:otherwise>
        <xsl:element name="owl:ObjectProperty">
          <xsl:apply-templates mode="detail" select="."/>
        </xsl:element>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <xsl:template mode="detail" match="typedef">
      <xsl:apply-templates mode="rdf-id" select="id"/>
      <rdfs:label>
        <xsl:value-of select="name"/>
      </rdfs:label>
      <xsl:for-each select="is_a">
        <rdfs:subPropertyOf>
          <xsl:apply-templates mode="rdf-resource" select="."/>
        </rdfs:subPropertyOf>
      </xsl:for-each>
  </xsl:template>

  <xsl:template match="is_a">
    <xsl:if test="not(@novel_inferred) and not(@problematic_inferred)">
      <xsl:comment>
        <xsl:text> </xsl:text>
        <xsl:value-of select="key('terms',.)/name"/>
        <xsl:text> </xsl:text>
      </xsl:comment>
      <rdfs:subClassOf>
        <xsl:apply-templates mode="rdf-resource" select="."/>
      </rdfs:subClassOf>
    </xsl:if>
  </xsl:template>

  <xsl:template match="relationship">
    <rdfs:subClassOf>
      <xsl:apply-templates mode="restriction" select="."/>      
    </rdfs:subClassOf>
  </xsl:template>
   
  <xsl:template match="intersection_of">
    <xsl:choose>
      <xsl:when test="type='is_a'">
        <owl:Class>
          <xsl:apply-templates mode="rdf-about" select="to"/>
        </owl:Class>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates mode="restriction" select="."/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <xsl:template mode="restriction" match="*">
    <owl:Restriction>
      <owl:onProperty>
        <owl:ObjectProperty>
          <xsl:apply-templates mode="rdf-about" select="type"/>
        </owl:ObjectProperty>
      </owl:onProperty>
      <owl:someValuesFrom>
        <xsl:apply-templates mode="rdf-resource" select="to"/>
      </owl:someValuesFrom>
    </owl:Restriction>
    <xsl:comment>
      <xsl:text> </xsl:text>
      <xsl:value-of select="key('terms', to)/name"/>
      <xsl:text> </xsl:text>
    </xsl:comment>
  </xsl:template>
 
  <xsl:template match="text()|@*">
  </xsl:template>

<xsl:template match="defstr">
        <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
      <xsl:value-of select="."/>
      </rdfs:comment>
</xsl:template>

  <!-- RDF stuff -->
  <xsl:template mode="rdf-id" match="*">
    <xsl:attribute name="rdf:ID">
      <xsl:value-of select="translate(.,':','_')"/>
    </xsl:attribute>
  </xsl:template>

  <xsl:template mode="rdf-about" match="*">
    <xsl:attribute name="rdf:about">
      <xsl:text>#</xsl:text>
      <xsl:value-of select="translate(.,':','_')"/>
    </xsl:attribute>
  </xsl:template>

  <xsl:template mode="rdf-resource" match="*">
    <xsl:attribute name="rdf:resource">
      <xsl:text>#</xsl:text>
      <xsl:value-of select="translate(.,':','_')"/>
    </xsl:attribute>
  </xsl:template>

</xsl:stylesheet>

====================



From: [hidden email] on behalf of jennifer flores
Sent: Tue 10/10/2006 6:11 PM
To: [hidden email]
Subject: [protege-owl] .xml - .owl convertion

Hi,

I'm trying get an application to convert a .xml file into a .owl file but I can't fid one. If anyone has one or any ideas of how to make it, would be great.


 



Acepta el reto MSN Premium: incluye Antivirus y Firewall de McAffee. Descárgalo y pruébalo 2 meses gratis.

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] .xml - .owl convertion

ahtisham aslam
In reply to this post by jennifer flores
Hi,
Let have a look on the follwoing link.
http://xml2owl.sourceforge.net/
I hope it will help you.
Bye.


Muhammad Ahtisham Aslam
Ph.D Student
Room No. 5-06
Institute Of Informatics
University Of Leipzig
Germany


----- Original Message ----
From: "Kim,Soonho" <[hidden email]>
To: User support for the Protege-OWL editor <[hidden email]>; [hidden email]
Sent: Wednesday, October 11, 2006 1:26:36 PM
Subject: Re: [protege-owl] .xml - .owl convertion

I am doing the same work, which is converting xml --> owl.
I thought two ways: one is to use XSLT, the other is to use any programming language such as java (parse xml file and write corresponing owl file. I am doing the first one: using XSLT.
 
I found an example of xslt to do it. I hope it might help you to work out.
See the below
-----------------

<?xml version = "1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xml:base="http://www.geneontology.org/owl/">
 
  <xsl:output indent="yes" method="xml"/>

  <xsl:key name="terms" match="term" use="id"/>

  <xsl:template match="/">
    <rdf:RDF
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xmlns="http://www.geneontology.org/owl/#"
  xml:base="http://www.geneontology.org/owl/">
      <owl:Ontology rdf:about=""/>
      <xsl:apply-templates select="obo/term"/>
      <xsl:apply-templates select="obo/typedef"/>
    </rdf:RDF>
  </xsl:template>

  <xsl:template match="term">
    <xsl:element name="owl:Class">
      <xsl:apply-templates mode="rdf-id" select="id"/>
      <rdfs:label>
        <xsl:value-of select="name"/>
      </rdfs:label>
      <xsl:apply-templates select="def/defstr"/>
      <xsl:apply-templates select="is_a"/>
      <xsl:apply-templates select="relationship"/>
      <xsl:if test="count(intersection_of)>0">
        <owl:equivalentClass>
          <owl:Class>
            <owl:intersectionOf>
              <xsl:attribute name="rdf:parseType">Collection</xsl:attribute>
              <xsl:apply-templates select="intersection_of"/>
            </owl:intersectionOf>
          </owl:Class>
        </owl:equivalentClass>
      </xsl:if>
    </xsl:element>
  </xsl:template>

  <xsl:template match="typedef">
    <xsl:choose>
      <xsl:when test="is_transitive=1">
        <xsl:element name="owl:TransitiveProperty">
          <xsl:apply-templates mode="detail" select="."/>
        </xsl:element>
      </xsl:when>
      <xsl:otherwise>
        <xsl:element name="owl:ObjectProperty">
          <xsl:apply-templates mode="detail" select="."/>
        </xsl:element>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <xsl:template mode="detail" match="typedef">
      <xsl:apply-templates mode="rdf-id" select="id"/>
      <rdfs:label>
        <xsl:value-of select="name"/>
      </rdfs:label>
      <xsl:for-each select="is_a">
        <rdfs:subPropertyOf>
          <xsl:apply-templates mode="rdf-resource" select="."/>
        </rdfs:subPropertyOf>
      </xsl:for-each>
  </xsl:template>

  <xsl:template match="is_a">
    <xsl:if test="not(@novel_inferred) and not(@problematic_inferred)">
      <xsl:comment>
        <xsl:text> </xsl:text>
        <xsl:value-of select="key('terms',.)/name"/>
        <xsl:text> </xsl:text>
      </xsl:comment>
      <rdfs:subClassOf>
        <xsl:apply-templates mode="rdf-resource" select="."/>
      </rdfs:subClassOf>
    </xsl:if>
  </xsl:template>

  <xsl:template match="relationship">
    <rdfs:subClassOf>
      <xsl:apply-templates mode="restriction" select="."/>      
    </rdfs:subClassOf>
  </xsl:template>
   
  <xsl:template match="intersection_of">
    <xsl:choose>
      <xsl:when test="type='is_a'">
        <owl:Class>
          <xsl:apply-templates mode="rdf-about" select="to"/>
        </owl:Class>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates mode="restriction" select="."/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <xsl:template mode="restriction" match="*">
    <owl:Restriction>
      <owl:onProperty>
        <owl:ObjectProperty>
          <xsl:apply-templates mode="rdf-about" select="type"/>
        </owl:ObjectProperty>
      </owl:onProperty>
      <owl:someValuesFrom>
        <xsl:apply-templates mode="rdf-resource" select="to"/>
      </owl:someValuesFrom>
    </owl:Restriction>
    <xsl:comment>
      <xsl:text> </xsl:text>
      <xsl:value-of select="key('terms', to)/name"/>
      <xsl:text> </xsl:text>
    </xsl:comment>
  </xsl:template>
 
  <xsl:template match="text()|@*">
  </xsl:template>

<xsl:template match="defstr">
        <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
      <xsl:value-of select="."/>
      </rdfs:comment>
</xsl:template>

  <!-- RDF stuff -->
  <xsl:template mode="rdf-id" match="*">
    <xsl:attribute name="rdf:ID">
      <xsl:value-of select="translate(.,':','_')"/>
    </xsl:attribute>
  </xsl:template>

  <xsl:template mode="rdf-about" match="*">
    <xsl:attribute name="rdf:about">
      <xsl:text>#</xsl:text>
      <xsl:value-of select="translate(.,':','_')"/>
    </xsl:attribute>
  </xsl:template>

  <xsl:template mode="rdf-resource" match="*">
    <xsl:attribute name="rdf:resource">
      <xsl:text>#</xsl:text>
      <xsl:value-of select="translate(.,':','_')"/>
    </xsl:attribute>
  </xsl:template>

</xsl:stylesheet>

====================



From: [hidden email] on behalf of jennifer flores
Sent: Tue 10/10/2006 6:11 PM
To: [hidden email]
Subject: [protege-owl] .xml - .owl convertion

Hi,

I'm trying get an application to convert a .xml file into a .owl file but I can't fid one. If anyone has one or any ideas of how to make it, would be great.


 


Acepta el reto MSN Premium: incluye Antivirus y Firewall de McAffee. Descárgalo y pruébalo 2 meses gratis.
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03



_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03