If I create an object with two relationships, the second relationship always fails with the error:
The prefix "myns" for element "myns:owner" is not bound if I switch them round, the previously successful one fails with that error. Element rdfRoot = rdfXmlContent.getDomNode().getOwnerDocument().createElementNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "RDF"); Element rdfDescription = rdfXmlContent.getDomNode().getOwnerDocument().createElementNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "Description"); rdfDescription.setAttributeNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "about", "info:fedora/" + schema + ":" + collection.getTitle()); rdfRoot.appendChild(rdfDescription); Element isCollection = rdfXmlContent.getDomNode().getOwnerDocument().createElementNS("http://www.nsdl.org/ontologies/relationships#", "isCollection"); Text isCollectionTextNode = rdfXmlContent.getDomNode().getOwnerDocument().createTextNode("true"); isCollection.appendChild(isCollectionTextNode); rdfDescription.appendChild(isCollection); if (collection.getOwner() != null) { Element owner = rdfXmlContent.getDomNode().getOwnerDocument().createElementNS("http://www.nsdl.org/ontologies/relationships#", "owner"); Text ownerTextNode = rdfXmlContent.getDomNode().getOwnerDocument().createTextNode(collection.getOwner()); owner.appendChild(ownerTextNode); rdfDescription.appendChild(owner); } rdfXmlContent.getDomNode().appendChild(rdfRoot); The prefix "myns" for element "myns:isCollection" is not bound could anyone advise please? thanks, Alistair -------------- mov eax,1 mov ebx,0 int 80 ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ Fedora-commons-users mailing list Fedora-commons-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fedora-commons-users