Attribute authorsAttr = srcItem.getAttribute("authors"); if (authorsAttr != null) { String authorStr = authorsAttr.getValue(); StringTokenizer st = new StringTokenizer(authorStr, ";"); while (st.hasMoreTokens()) { String name = st.nextToken().trim(); Item author = createItem(tgtNs + "Author", ""); author.addAttribute(new Attribute("name", name)); result.add(author);
if (srcItem.hasAttribute("authors")) { Attribute authorsAttr = srcItem.getAttribute("authors"); if (authorsAttr != null) { String authorStr = authorsAttr.getValue(); StringTokenizer st = new StringTokenizer(authorStr, ";"); while (st.hasMoreTokens()) { String name = st.nextToken().trim(); Item author = createItem(tgtNs + "Author", ""); author.addAttribute(new Attribute("name", name)); result.add(author); }
    protected Set createAuthors(Item srcItem) {        Set result = new HashSet();        Attribute authorsAttr = srcItem.getAttribute("authors");        if (authorsAttr != null) {            String authorStr = authorsAttr.getValue();            StringTokenizer st = new StringTokenizer(authorStr, ";");            while (st.hasMoreTokens()) {                String name = st.nextToken().trim();                Item author = createItem(tgtNs + "Author", "");                author.addAttribute(new Attribute("name", name));                result.add(author);            }        }        return result;    }