There are a host of characters that are legal in a
java identifier that are not legal as xml names. I think JAXB will need
a java -> xml name mapping algorithm. Here's a little program to print
them (requires xerces):
import org.apache.xerces.util.XMLChar;
public class NameTest
{
public static void main(String[] args)
{
for (char c = 0; c < Character.MAX_VALUE; c++) {
if (Character.isJavaIdentifierPart(c)) {
if (!XMLChar.isName(c))
The following issue was raised by Scott Ziegler
There are a host of characters that are legal in a java identifier that are not legal as xml names. I think JAXB will need a java -> xml name mapping algorithm. Here's a little program to print them (requires xerces):
import org.apache.xerces.util.XMLChar;
public class NameTest { public static void main(String[] args) { for (char c = 0; c < Character.MAX_VALUE; c++) { if (Character.isJavaIdentifierPart(c)) { if (!XMLChar.isName(c))
{ System.out.println("CHAR:\t" + (int)c); }
} } } }
Environment
Operating System: All Platform: All
Affected Versions
[2.0 draft]