Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9087569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:43:33+00:00 2026-06-16T21:43:33+00:00

I have recently started learning Web Ontology Language (OWL). I want to define a

  • 0

I have recently started learning Web Ontology Language (OWL). I want to define a DataProperty with my own defined range of value.
Consider the following property:

  <owl:DatatypeProperty rdf:ID="myProperty">
     <rdfs:domain rdf:resource="#MyDomain"/>
     <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
  </owl:DatatypeProperty>

The property has the range of double value but I want to restrict the range in order to make my property to accept only double values between 0 and 1. I would be very grateful if you guide me how to define my own ranges for data properties.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:43:35+00:00Added an answer on June 16, 2026 at 9:43 pm

    Here you go (in Turtle rather than RDF/XML, for conciseness):

    :myProperty  a  owl:DatatypeProperty;
        rdfs:domain  :MyDomain;
        rdfs:range  [
            a  rdfs:Datatype;
            owl:onDatatype  xsd:double;
            owl:withRestrictions ( [xsd:minInclusive 0] [xsd:maxInclusive 1] )
        ] .
    

    I would suggest that you use xsd:decimal instead of xsd:double, because xsd:double is limited in precision and is disjoint from xsd:decimal, which also makes it disjoint from xsd:integer, xsd:int, etc.

    UPDATE: in RDF/XML, it corresponds to (look at how messy it is compared to Turtle):

    <owl:DatatypeProperty rdf:about="#myProperty">
        <rdfs:domain rdf:resource="#MyDomain"/>
        <rdfs:range>
            <rdfs:Datatype>
                <owl:onDatatype rdf:resource="&xsd;double"/>
                <owl:withRestrictions rdf:parseType="Collection">
                    <rdf:Description>
                        <xsd:minInclusive rdf:datatype="&xsd;double">0</xsd:minInclusive>
                    </rdf:Description>
                    <rdf:Description>
                        <xsd:maxInclusive rdf:datatype="&xsd;double">1</xsd:maxInclusive>
                    <rdf:Description>
                    </rdf:Description>
                </owl:withRestrictions>
            </rdfs:Datatype>
        </rdfs:range>
    </owl:DatatypeProperty>
    

    But if you are writing RDF directly with a text editor, you should really learn to use Turtle. It’s much simpler and more concise than RDF/XML. You can really see the triples. And it’s going to be a standard soon, the move to W3C Candidate Recommendation is imminent.

    **Update October 3rd, 2017: Turtle was standardised in February 2014. If you prefer a notation for RDF based on JSON, there is also JSON-LD, another W3C standard.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently started learning Ruby, as my first programming language. I feel comfortable
I have recently started learning Fortran for the fun of it, and I want
I've been a web developer for some time now, and have recently started learning
I have recently started learning c# and have come across an issue. I'm not
Recently I have started learning rails and was a little surprised that the default
I have only started learning python recently. I would still be considered a beginner.
I have only started learning Python recently. Let me explain what I am trying
I have recently started learning Perl and one of my latest assignments involves searching
I have recently started learning C++, but I require a compiler. I have tried
I have recently started learning C++ and coming from a Ruby environment I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.