Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

addind new datatype into a owl file for furthering using 1

Status
Not open for further replies.

withnodelay

Programmer
Sep 4, 2009
3
ES
Hi all, I m actually dealing with adding into my owl file a new coordinate datatype feature. I m having problems while parsing with turtle.
What I want to do is:
1)Create my new datatype as follows:

<!-- Spatial coord-->
<xsd:schema xmlns:xsd=" <xsd:element name="coordinate" type="xsd:string"/>
</xsd:schema>


2)getting my domain new type associated (owl stuff)

<owl:DatatypeProperty rdf:ID="has_Coordinate">
<rdfs:domain rdf:resource="#E47.Spatial_Coordinates"/>
<rdfs:range rdf:resource=" </owl:DatatypeProperty>


3)Defining the literal as my new type:

<has_Coordinate rdf:datatype=" <coord>40.483890533447266,-3.36331844329834
</coord>
</has_Coordinate>


I think my problems begin in the referring namespace. Got next error while parsing with turtle: rdf:datatype specified on a node with resource value!! Any suggestion would be in advance thanks, Carlos
 
[1] I think the issue of user-defined data type is very much not unsettled officially? The general construction of it, however, if not to make it to an xsd:element, but to make it a type, more particularly here, xsd:simpleType. An id has to be added, side-by-side with the name. This is just a primitive suggestion.

[2] Since xsd:string is supported without the need of making a user-defined type, hence, I suppose you want to restrict it. I can go as far as making it ranging from (-180, 180] and [-90,90]. It would be quite long in the pattern. Instead, I make a rough two components pattern. (Since it is not the issue of focus here, its construction is very rudimentary.)
[tt]
<xsd:simpleType name="coordinate" id="coordinate">
<xsd:restriction base="xsd:string">
<xsd:pattern value="-?\d+(\.\d+)?,\s?-?\d+(\.\d+)?" />
</xsd:restriction>
</xsd:simpleType>
[/tt]
[3] The coord tag's construction would be something like this, I guess (only).
[tt]
<coord rdf:datatype="[ignore][/ignore]">
40.483890533447266,-3.36331844329834
</coordinate>
[/tt]
[4] Again, I stress, take all the above only figurative. I cannot be even convinced myself it is correct to the last iota. The topic is still very much under research and consensus searching.
 
Thanks tsuji!!
I have sorted my probbs which basically were about point 1. I have properly defined my user defined type and everything goes ok.

thanks man
 
this is my final using
<xs:element name="coordinate">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="whatever"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top