private void printKeyRef(String dbName, ORASSNode node, int numOfTabs, boolean isRoot) {
		
		String tableName = node.getName();
		
		writer.println(getTabs(numOfTabs)     + "<xs:keyref name=\""+tableName+"_KeyRef"+"\" refer=\""+tableName+"_Key"+"\">");
		writer.println(getTabs(numOfTabs + 1) + "<xs:selector xpath=\""+dbName+"/*\"/>");
		writer.println(getTabs(numOfTabs + 1) + "<xs:field xpath=\"@"+tableName+"_Ref\"/>");
		writer.println(getTabs(numOfTabs)     + "</xs:keyref>");
		writer.println();
		
		if (isRoot)
			return;
		
		List<ORASSNode> children = node.getChildren();
		Iterator<ORASSNode> itr = children.iterator();
		while (itr.hasNext()) {
			ORASSNode child = itr.next();
			printKeyRef(dbName, child, numOfTabs, false);
		}
	
	}