private static String formatLocationInfo(final Node node)
    {
        final Node parentNode = node.getParentNode();

        return "at " +
            "<" + parentNode.getNodeName() +
            (getAttributeValueOrNull(parentNode, "name") == null ?
                ">" : (" name=\"" + getAttributeValueOrNull(parentNode, "name") + "\"> ")) +
            "<" + node.getNodeName() +
            (getAttributeValueOrNull(node, "name") == null ?
                ">" : (" name=\"" + getAttributeValueOrNull(node, "name") + "\"> "));
    }
Check name against validity for C++ and Java naming. Warning if not valid.

@param node to have the name checked.
@param name of the node to be checked.
sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/XmlSchemaParser.java