In my experience XML parsers don't really treat whitespace consistently. The
best thing to do is to trim() any strings you get from the parser, unless of
course you need the whitespace.

Peter

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Joe Gittings
Sent: Tuesday, September 19, 2000 9:54 AM
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Cc: 'Helene JOANIN'
Subject: RE: minor bug in GenIC when dealing with XML comments (Jonas
2.0.0)


Hi Helene,

Thanks for your reply. You're right, on further testing, the problem is to
do with having a carriage return in the prim-key-class value. If I ensure
the entire prim-key-class entry is on a single line, there are no problems
with the placement of the comment.

However shouldn't your XML parser be tolerant of whitespace (including
carriage returns) in attribute values? I know that the XML parser in the
Caucho Resin servlet engine is, as our administrator here puts loads of
whitespace in the attribute values in our web.xml files, and Resin reads
them fine.

I know it's a minor point...  :)

Joe

-----Original Message-----
From:   Helene JOANIN [SMTP:[EMAIL PROTECTED]]
Sent:   Tuesday, September 19, 2000 8:30 AM
To:     Joe Gittings
Cc:     [EMAIL PROTECTED]; '[EMAIL PROTECTED]'
Subject:        Re: minor bug in GenIC when dealing with XML comments (Jonas
2.0.0)

Hi Joe,

First of all, thank you very much for your interest to JOnAS.

I'm not sure this is a bug; but I'm not a XML expert !!!

Indeed the second example give the same error as the first one;
as well as the following example
        <prim-key-class>
uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonPK
        </prim-key-class>
Indeed, in those tree examples, the 'enter' character is included
in the <prim-key-class> value.

On the other hand, the following example work fine
      <prim-key-class><!--test trailin
comment-->uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonPK</prim-key-class>

What do the XML experts think about that ??

Kind regards.
Helene.

Joe Gittings wrote:
>
> Dear Jonas team,
>
> Just to let you know, it appears to me that comments in ejb-jar.xml can
> cause problems for GenIC (Jonas 2.0.0). Specifically:
>
>       <prim-key-class>
>         <!--test leading
> comment-->uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonPK</prim-key-class>
>
> causes the following error:
> ERROR: Primary Key class not found for bean TaxonFacade:
>         uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonPK
> GenIC ERROR: When reading the Deployment Descriptors for
> data.taxon.TaxonFacade.
> xml
>
> However,
>       <prim-key-class>
>         uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonPK<!--test trailing
> comment--></prim-key-class>
>
> works fine. In other words, GenIC falls over if there is a comment
> preceding the prim-key-class value, but doesn't mind if the comment
follows
> the value. Both are correct XML, aren't they? Not a critical bug but you
> should know!
>
> Joe
>
> =====================================================================
> Joe Gittings, Royal Botanic Gardens, Kew
> Hanover House, Kew, Richmond, Surrey TW9 3AB
>
> [EMAIL PROTECTED]
> +44 20 8332 5712
> fax: +44 20 8332 5736
>
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".

--
-=- Helene JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  mailto:[EMAIL PROTECTED]   http://www.evidian.com
  Phone: 33.4.76.29.73.53            Fax: 33.4.76.29.76.00
  Download our EJB Server JOnAS at http://www.objectweb.org

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to