I am trying to attach some custom RDF metadata to a TextSection... here is a snippet of code that I use to attach the RDF metadata :
<code> Dim odoc odoc = thisComponent Dim osection osection = odoc.getTextSections().getByName("Section1") Dim docText docText= odoc.getText() UriService = com.sun.star.rdf.URI UriSService = com.sun.star.rdf.URIs LiteralService = com.sun.star.rdf.Literal Dim uriAnx uriAnx = UriService.create("http://editor.bungeni.org/anx" ) Dim rdfMetafile rdfMetafile = odoc.addMetadataFile("meta/meta.rdf", Array(uriAnx)) Dim rdfGraph rdfGraph = odoc.getRDFRepository().getGraph(rdfMetafile) Dim uriSecType, litSecType uriSecType = UriService.create("http://editor.bungeni.org/anx/sectionType") litSecType = LiteralService.create("Clause") rdfGraph.addStatement(osection, uriSecType, litSecType) Dim uriSecUUID, litSecUUID uriSecUUID = UriService.create("http://editor.bungeni.org/anx/sectionUUID") litSecUUID = LiteralService.create("1723-18388-38383-38383") rdfGraph.addStatement(osection, uriSecUUID, litSecUUID) </code> The problem is that the metadata looks like this : <code> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="../content.xml#id322214793"> <ns1:sectionType xmlns:ns1="http://editor.bungeni.org/anx/">Clause</ns1:sectionType> <ns2:sectionUUID xmlns:ns2="http://editor.bungeni.org/anx/">1723-18388-38383-38383</ns2:sectionUUID> </rdf:Description> </rdf:RDF> </code> Notice how the ns1 and ns2 namespace prefixes are duplicated .... But i want it to look like this -- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="../content.xml#id322214793" xmlns:anx="http://editor.bungeni.org/anx" > <anx:sectionType>Clause</anx:sectionType> <anx:sectionUUID>1723-18388-38383-38383</anx:sectionUUID> </rdf:Description> </rdf:RDF> How do i do this ? ... I tried using various combinations using createNS() instead of create() but couldnt get it to look like this .... Ashok --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org