[dev] Re: RDF metadata, unable to read ?

2011-02-11 Thread Michael Stahl
On 11/02/2011 09:24, underscore wrote:
> I think i found a bug in the rdf implementation -- the problem seems
> to manifest if i give a particular kind of URI --
> 
> If i use this format "http://www.xyz.org/1.0"; as the URI for the rdf
> graph while saving :
> 
> Dim uriAnx
> uriAnx = UriService.create("http://editor.bungeni.org/1.0"; )
> Dim rdfMetafile
> rdfMetafile = odoc.addMetadataFile("meta/meta.rdf", Array(uriAnx))
> 
> In the above case the URI namespace is not recorded in manifest.rdf.
> 
> If i use this format "http://www.xyz.org/1.0/abc"; as the URI for the
> rdf graph while saving :
> 
> Dim uriAnx
> uriAnx = UriService.create("http://editor.bungeni.org/1.0/anx"; )
> Dim rdfMetafile
> rdfMetafile = odoc.addMetadataFile("meta/meta.rdf", Array(uriAnx))
> 
> It works fine and I am able to browse the graph names in the repository.
> In this case the URI namespace is recorded in manifest.rdf
> 
> Is this a bug or valid behavior ?

this is problem in the raptor "rdfxml-abbrev" serialization that was
reported recently.
it is fixed in CWS sw34bf03, which is not yet integrated, but will likely
go into OOo 3.4.
you can track the progress of this CWS here:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fsw34bf03

to fix it i've switched to the "rdfxml" serialization, which does not seem
to suffer from this bug.
it also creates even more verbose files...

issue:

> To comment on the following update, log in, then open the issue:
> http://www.openoffice.org/issues/show_bug.cgi?id=116443
> 
> 
> User mst changed the following:
> 
> What|Old value |New value
> 
>  Summary|[unordf] URIs that end in |[unordf] certain URIs caus
> |"#" cause data loss   |e data loss
> 
> 
> 
> 
> 
> --- Additional comments from m...@openoffice.org Fri Feb 11 10:15:55 
> + 2011 ---
> the URI "http://editor.bungeni.org/1.0"; apparently causes the same problem,
> but does not end with '#'.
> it is also fixed by switching to "rdfxml".

-- 
"Faith means not wanting to know what is true." -- Friedrich Nietzsche


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



[dev] Re: RDF metadata, unable to read ?

2011-02-11 Thread underscore
I think i found a bug in the rdf implementation -- the problem seems
to manifest if i give a particular kind of URI --

If i use this format "http://www.xyz.org/1.0"; as the URI for the rdf
graph while saving :

Dim uriAnx
uriAnx = UriService.create("http://editor.bungeni.org/1.0"; )
Dim rdfMetafile
rdfMetafile = odoc.addMetadataFile("meta/meta.rdf", Array(uriAnx))

In the above case the URI namespace is not recorded in manifest.rdf.

If i use this format "http://www.xyz.org/1.0/abc"; as the URI for the
rdf graph while saving :

Dim uriAnx
uriAnx = UriService.create("http://editor.bungeni.org/1.0/anx"; )
Dim rdfMetafile
rdfMetafile = odoc.addMetadataFile("meta/meta.rdf", Array(uriAnx))

It works fine and I am able to browse the graph names in the repository.
In this case the URI namespace is recorded in manifest.rdf

Is this a bug or valid behavior ?

The documentation is a bit ambiguous on this 




On Thu, Feb 10, 2011 at 6:03 PM, underscore  wrote:
> I have a ODF document where I have applied RDF metadata (using the UNO
> API) to a textsection which looks like this :
>
> (met/meta.rdf)
>
> http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
>  
>     xmlns:ns1="http://anx.bungeni.org/1.0/";>Clause
>     xmlns:ns2="http://anx.bungeni.org/1.0/";>1723-18388-38383-38383
>  
> 
>
> I am unable to read it back --
>
> e.g. [1]
> 
> 
> Dim rdfRepo
> rdfRepo = thisComponent.getRDFRepository()
> Dim arrGraphs
> arrGraphs = rdfRepo.getGraphNames()
>
> 
>
> In the above case ... getGraphNames() always returns an empty array !
>
> e.g. [2]
> 
> Dim uriAnx
> uriAnx = UriService.create("http://anx.bungeni.org/1.0"; )
> Dim uriGraphs
> uriGraphs = thisComponent.getMetadataGraphsWithType(uriAnx)
> 
>
> In the above case too  getMetadataGraphsWithType() returns a empty
> array ...but the document has the metadata.
>
> What am i doing wrong ? Is this not the way to retrieve the metadata graph ?
>
> Just for reference -- this is what the manifest.rdf looks like 
>
> 
> http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
>   xmlns:ns1="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#";
> rdf:about="">
>    
>    
>    
>  
>   xmlns:ns2="http://docs.oasis-open.org/ns/office/1.2/meta/odf#";
> rdf:about="styles.xml"/>
>   xmlns:ns3="http://docs.oasis-open.org/ns/office/1.2/meta/odf#";
> rdf:about="content.xml"/>
> 
>

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org