CompactNodeTypeDefWriter writer = new CompactNodeTypeDefWriter(sw, new NamespaceResolverImpl(sessionInfo), true);
writer.write(Arrays.asList(nodeTypeDefinitions));
writer.close();
final String cnd = sw.toString();
val.add(new XmlSerializable() {
public Element toXml(Document document) {
Element cndElem = document.createElementNS(JcrRemotingConstants.NS_URI, JcrRemotingConstants.NS_PREFIX + ":" + JcrRemotingConstants.XML_CND);
DomUtil.setText(cndElem, cnd);
return cndElem;
}
});
val.add(new XmlSerializable() {
public Element toXml(Document document) {
Element allowElem = document.createElementNS(JcrRemotingConstants.NS_URI, JcrRemotingConstants.NS_PREFIX + ":" + JcrRemotingConstants.XML_ALLOWUPDATE);
DomUtil.setText(allowElem, Boolean.toString(allowUpdate));
return allowElem;
}