Frank, it looks like you didn't include the '#' sign on the end of the namespace URL. You will need that.
Greg Jansen Carolina Digital Library Developer UNC Chapel Hill \yf508 wrote: > Hi all, > > I have a problem while dealing with foxml document by using dom4j in our > project. The namespace of foxml ("info:fedora/fedora-system:def/foxml#") is > not working in my program. Any suggestions? > > Thanks > > Frank > > > P.S. The code fragement is shown below: > > HashMap<String,String> map = new HashMap<String,String>(); > map.put("vra", "http://dlib.york.ac.uk/vra4york"); > map.put("foxml", "info:fedora/fedora-system:def/foxml"); > > XPath xpath = > DocumentHelper.createXPath("//foxml:datastream[ID='"+dsId+"']/foxml:datastre > amVersion[last()]/vra:vra"); > xpath.setNamespaceURIs(map); > org.dom4j.Element vraElt = ((org.dom4j.Element) > xpath.selectSingleNode(foxmlDoc.getRootElement())).createCopy(); > > > --------------------------------- > Dr. Yankui(Frank) Feng > Digital Library Systems Developer > The University of York > Heslington, York, YO10 5DD, UK > Tel: +44 (0) 1904-434507 > Email: yf508 at york.ac.uk > --------------------------------- > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fedora-commons-developers mailing list > Fedora-commons-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Fedora-commons-developers mailing list Fedora-commons-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers