Menu

#16 Wrong String syntax in generated Java

Defect
open
nobody
None
5
2002-10-12
2002-10-12
Anonymous
No

When translating the following book.dtd

<!ELEMENT book EMPTY>
<!ATTLIST book bestseller (yes|no) "yes">

through the chain dtd -> qdml -> qjml -> java2
the following Java source for Book is generated:

import com.jxml.quick.*;

public class Book
{
public String _book_bestseller=yes;

public String getBook_bestseller()
{
return _book_bestseller;
}

public void setBook_bestseller(String __v)
{
_book_bestseller=__v;
}
}

Note that the double quotes around the string
constant "yes" in the definition of _book_bestseller
are missing which leads to a Java compilation error

Discussion