You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Ralph Perniciaro <ra...@eagles.usm.edu> on 2013/10/29 19:53:25 UTC

How to export uri prefixes within a resourse value

All,

Is it possible to include namespace prefixes within resource values on
export to rdf.
This is done for property names but not values.

For example can

<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>

be exported like

<rdf:type rdf:resource="rdfs:Resource"/>

based on prefix
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >

and this to be done for each prefix.

Thanks!

Ralph

Re: Re: How to export uri prefixes within a resourse value

Posted by Ralph Perniciaro <ra...@eagles.usm.edu>.
Thanks!  I will check.


On Wed, Oct 30, 2013 at 3:23 AM, Chris Dollin
<ch...@epimorphics.com>wrote:

> On Tuesday, October 29, 2013 08:01:33 PM Martynas Jusevičius wrote:
> > What you want can be done on the syntactic XML level using entities:
> > <rdf:type rdf:resource="&rdfs;Resource"/>
> > This would require a local entity definition however:
> >
> > <!DOCTYPE rdf:RDF [
> >     <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
> > ]>
> >
> > I don't think it can be done using qualified names as attribute values
> > as in your example.
>
> You used to be able to enable entity declaration and use in the
> RDF/XML writer; it should be in the IO documentation.
>
> (RDF/XML is never going to look pretty, though, prefixes, entities
> & breakdancing regardless.)
>
> Chris
>
> --
> "I know it was late, but Mountjoy never bothers,                /Archer's
> Goon/
>  so long as it's the full two thousand words."
>
> Epimorphics Ltd, http://www.epimorphics.com
> Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20
> 6PT
> Epimorphics Ltd. is a limited company registered in England (number
> 7016688)
>
>

Re: Re: How to export uri prefixes within a resourse value

Posted by Chris Dollin <ch...@epimorphics.com>.
On Tuesday, October 29, 2013 08:01:33 PM Martynas Jusevičius wrote:
> What you want can be done on the syntactic XML level using entities:
> <rdf:type rdf:resource="&rdfs;Resource"/>
> This would require a local entity definition however:
> 
> <!DOCTYPE rdf:RDF [
>     <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
> ]>
> 
> I don't think it can be done using qualified names as attribute values
> as in your example.

You used to be able to enable entity declaration and use in the
RDF/XML writer; it should be in the IO documentation.

(RDF/XML is never going to look pretty, though, prefixes, entities
& breakdancing regardless.)

Chris

-- 
"I know it was late, but Mountjoy never bothers,                /Archer's Goon/
 so long as it's the full two thousand words."

Epimorphics Ltd, http://www.epimorphics.com
Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT
Epimorphics Ltd. is a limited company registered in England (number 7016688)


Re: How to export uri prefixes within a resourse value

Posted by Martynas Jusevičius <ma...@graphity.org>.
What you want can be done on the syntactic XML level using entities:
<rdf:type rdf:resource="&rdfs;Resource"/>
This would require a local entity definition however:

<!DOCTYPE rdf:RDF [
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
]>

I don't think it can be done using qualified names as attribute values
as in your example.

Martynas
graphityhq.com

On Tue, Oct 29, 2013 at 7:53 PM, Ralph Perniciaro
<ra...@eagles.usm.edu> wrote:
> All,
>
> Is it possible to include namespace prefixes within resource values on
> export to rdf.
> This is done for property names but not values.
>
> For example can
>
> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
>
> be exported like
>
> <rdf:type rdf:resource="rdfs:Resource"/>
>
> based on prefix
>     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >
>
> and this to be done for each prefix.
>
> Thanks!
>
> Ralph