Snip
|
RDF datatypes are based on XSD datatypes, which are ofte... Unfortunately, most implementations simply have the XSD ... do not support or validate new datatype descriptions (th... sord_validate can). Regardless, it is sometimes necessar... datatype wi
|
---|
Categories |
|
---|
For Snip |
loading snip actions ... |
---|---|
For Page |
loading url actions ... |
sord_validate
can). Regardless, it is sometimes necessary to define a datatype with a specific restriction so it can be machine validated. It’s a bit tricky to figure out how to do this, since everything is buried in specifications that aren’t as triple oriented as they should be. So, here is an example of defining a datatype restricted by regular expression in Turtle, derived from the OWL documentation:HTML |
RDF datatypes are based on <a href="http://www.w3.org/TR/xmlschema11-2/">XSD datatypes</a>, which are often used directly. Unfortunately, most implementations simply have the XSD types baked in and do not support or validate new datatype descriptions (though at least <a href="http://drobilla.net/software/sord"><code>sord_validate</code></a> can). Regardless, it is sometimes necessary to define a datatype with a specific restriction so it can be machine validated. It’s a bit tricky to figure out how to do this, since everything is buried in specifications that aren’t as triple oriented as they should be. So, here is an example of defining a datatype restricted by regular expression in Turtle, derived from the OWL documentation: |
---|