+
+ // TODO check InstanceIdentifierTypeDefinition,
+ // IdentityrefTypeDefinition
+ if (baseType instanceof IdentityrefTypeDefinition) {
+ if (node.getValue() instanceof QName) {
+ QName qName = (QName) node.getValue();
+
+ ControllerContext contContext = ControllerContext.getInstance();
+ String moduleName = contContext.findModuleByNamespace(qName.getNamespace());
+
+ writer.value(moduleName + ":" + qName.getLocalName());
+ }
+
+ } else if (baseType instanceof LeafrefTypeDefinition) {
+ ControllerContext contContext = ControllerContext.getInstance();
+ LeafSchemaNode lfSchemaNode = contContext.resolveTypeFromLeafref((LeafrefTypeDefinition) baseType, schema);
+ if (lfSchemaNode != null) {
+ writeValueOfNodeByType(writer, node, lfSchemaNode.getType(), lfSchemaNode);
+ } else {
+ writer.value(value);
+ }
+ } else if (baseType instanceof InstanceIdentifierTypeDefinition) {