Hi all, the solution for my last post is attached.
The problems is in the file Literal.rb
The original code only treat integer as XSD::integer.
I completed the code to treat other values:
XSD::positiveInteger,XSD::nonNegativeInteger,XSD::decimal.
def self.typed(value, type)
case type
when XSD::string
String.new(value)
when XSD::date
DateTime.parse(value)
when XSD::boolean
value == 'true' or value == 1
when XSD::integer
value.to_i
when XSD::positiveInteger
value.to_i
when XSD::nonNegativeInteger
value.to_i
when XSD::decimal
value.to_f
end
end
Thanks
Samur
_______________________________________________
ActiveRDF mailing list
ActiveRDF lists.deri.org
http
://lists.deri.org/mailman/listinfo/activerdf
|