Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When I use the SQL/EQSL taglib or the SQL procesor, I get an exception DOM-002: Illegal Character – what does this mean?

0
Posted

When I use the SQL/EQSL taglib or the SQL procesor, I get an exception DOM-002: Illegal Character – what does this mean?

0

Cocoon creates XML elements based on the field names returned in the result set. If these returned field names contain characters that are disallowed by the XML specification, this exception will be thrown. This can happen in two main ways. Firstly, if you use a SQL function such as COUNT, which does not return a literal field, but a calculation. Secondly, if you have non-English characters in your field names (this is probably because some JDBC drivers are not properly internationalised). In both cases, the solution is the same – use the SQL ‘AS’ keyword to rename a field or a calculation to something that is a valid XML element name and only contains English characters. (Make sure to also change your stylesheet, if necessary, to match on the new element name.

0

Cocoon creates XML elements based on the field names returned in the result set. If these returned field names contain characters that are disallowed by the XML specification, this exception will be thrown. This can happen in two main ways. Firstly, if you use a SQL function such as COUNT, which does not return a literal field, but a calculation. Secondly, if you have non-English characters in your field names (this is probably because some JDBC drivers are not properly internationalised). In both cases, the solution is the same – use the SQL ‘AS’ keyword to rename a field or a calculation to something that is a valid XML element name and only contains English characters.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123