Thanks for your reply. That was most helpful. Unfortunately, I'm working third-party software that is heavily bound to table names with jdbc (no O/RM.) I'm kind of stuck with the table name.
Can you direct me anywhere in the torque documentation that talks about this kind of thing, or even somewhere in the API that I can extend to make this work? I am currently using the generator already, so I have no problem working with the code. I just need to know how to substitute the hex entity using java attributes (sounds like that's what you're saying.) Greg Monroe wrote: > The basic problem here is that in order for Torque to > produce code and tables across the many Database server > it does, it has to adhere fairly closely to the SQL > standards. > > The standards define that "regular identifiers" (e.g. > column and table names) must consist of basically the > same characters as a Java variable name and the XML > identifier rules. So, the Torque limits these > identifiers to this set. This means that the tables > and columns in the XML schema definitions will be > creatable in all the DB servers supported by Torque. > > So, this error is saying telling you that the table or > column name is not truly cross DB server compatible. If > you want a DB schema design that is able to be use on > any DB, use a different name. > > That said, if you don't want true cross DB names, you > MIGHT be able to get a little wiggle room in names by > using hex identifiers in the XML E.g. &X##; for SOME > of the characters. This may get around the XML parser > limits. You'll probably need to make sure you have > javaname attributes set in the XML to make the code work. > > FWIW, there is a part of the standard that allows for > delimited identifiers. E.g., "Non#Standard#char". > However, Torque currently does not support these. In > addition, different DB server types have variations > on this that make cross DB table names of this sort > problematic. > >> -----Original Message----- >> From: Leo Przybylski [mailto:[EMAIL PROTECTED] >> Sent: Saturday, March 01, 2008 12:01 AM >> To: torque-user@db.apache.org >> Subject: XML Entities in Table Names >> > Hello all, > > I'm new to the list. I tried searching for the answer to my question > > on > the internet, but I can't seem to find it. Maybe I am asking the wrong > question, but here it is. > > I am using torque to copy one database to another. For example, Oracle > to Oracle, or Oracle to MySQL. There is no way to know the source or > target. Torque doesn't seem to care, and that's what I like about it. > > Some RDBMS allow strange characters that are XML entities in the name. > For example, Oracle will allow something like DEPT$SECTION or > > something > like that. '$' causes problems in XML. Torque produces the following > error as a result: > [torque-data-dump] org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An > invalid or illegal XML character is specified. > > What can I do to get around this? I am not opposed to entity > translation > in XML (ie., <DEPT_DDOLLAR_SECTION ... /> where DDOLLAR replaces $,) > but > how would I go about that? > > > Much thanks in advance, > >> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] > DukeCE Privacy Statement: > Please be advised that this e-mail and any files transmitted with > it are confidential communication or may otherwise be privileged or > confidential and are intended solely for the individual or entity > to whom they are addressed. If you are not the intended recipient > you may not rely on the contents of this email or any attachments, > and we ask that you please not read, copy or retransmit this > communication, but reply to the sender and destroy the email, its > contents, and all copies thereof immediately. Any unauthorized > dissemination, distribution or copying of this communication is > strictly prohibited. > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]