is_a() function with hyperlink
Posted: Sat Apr 10, 2010 2:51 am
Hi. My name is Isaac.
My code is:
function getNodeTypeName($node) {
if (is_a($node, "BlankNode"))
return '';
elseif (is_a($node, 'Literal'))
return '';
elseif (is_a($node, 'Resource'))
return "<a href='/$node'>";
else {
if (RDFUtil::getNamespace($node) == RDF_NAMESPACE_URI || RDFUtil::getNamespace($node) == RDF_SCHEMA_URI || RDFUtil::getNamespace($node) == OWL_URI)
return '';}
return '';
}
........
Notice that my code:
elseif (is_a($node, 'Resource'))
return "<a href='/$node'>";
and the output link is:
http://localhost/Resource("http://202.1 ... -bar.jpg")
Can anyone help me how to make a link that directly point to http://202.185.70.191:8080/Monogenean/i ... al-bar.jpg
instead of the output above?
Really need help.
Thanks.
From Isaac. MALAYSIA.
My code is:
function getNodeTypeName($node) {
if (is_a($node, "BlankNode"))
return '';
elseif (is_a($node, 'Literal'))
return '';
elseif (is_a($node, 'Resource'))
return "<a href='/$node'>";
else {
if (RDFUtil::getNamespace($node) == RDF_NAMESPACE_URI || RDFUtil::getNamespace($node) == RDF_SCHEMA_URI || RDFUtil::getNamespace($node) == OWL_URI)
return '';}
return '';
}
........
Notice that my code:
elseif (is_a($node, 'Resource'))
return "<a href='/$node'>";
and the output link is:
http://localhost/Resource("http://202.1 ... -bar.jpg")
Can anyone help me how to make a link that directly point to http://202.185.70.191:8080/Monogenean/i ... al-bar.jpg
instead of the output above?
Really need help.
Thanks.
From Isaac. MALAYSIA.