|
From: Rod J. <rod...@in...> - 2003-05-30 07:59:19
|
JP,
Thanks for this. And thanks for putting the DTD on your website so we can
test PUBLIC.
Yes, all files use the same DTD. It's also possible to use a standalone bean
factory (for example in a Swing app or command-line app).
You're correct: I forgot the singleton attribute. Optional, default is
"true". I'll add this tonight.
Either class or parent att is required. Unfortunately I don't think DTD
allows this kind of control. The class attribute will be "inherited" from
ancestor definitions. This is useful when one bean's properties are used as
a basis for other definitions.
We need a definitive home for the DTD, but I guess that will be part of the
website. However, there must be a fallback option so that users can validate
without being online (this can be a big irritation).
I still can't get proper validation, even against your public DTD. I'm
using the following code:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(true);
DocumentBuilder db = factory.newDocumentBuilder();
Document doc = db.parse(is);
One note about your changed XML file:
Your change to map properties is over-enthusiastic:
<property name="mappings">
<value>/welcome.html=pagedListController</value>
<value>/detail.html=pagedListController</value>
</property>
This is only one value, parsed by the relevant PropertyEditor:
<value>
/welcome.html=pagedListController
/detail.html=pagedListController
</value>
Thomas, Isabelle:
I agree about breaking compatibility now. I would like to enforce validation
in all cases, but we'd have to solve how to get the DTD locally.
Regards,
Rod
----- Original Message -----
From: "JP Pawlak" <jp....@ti...>
To: "'Rod Johnson'" <rod...@in...>;
<spr...@li...>
Sent: Friday, May 30, 2003 2:34 AM
Subject: RE : [Springframework-developer] DTD
Hi Rod,
First, some remarks:
- You have changed the attribute of ref elements from refid to bean.
It's better, but has to be noticed.
- It seems you forgot the singleton attribute. I don't remember its
default value. It will be better set the DEFAULT in the DTD.
- Can really the class attribute be omitted for beans?
- Where should be the DTD? Clearly somewhere in the jar. Perhaps in a
ressource directory. I don't remember what is to do to retrieve locally
a PUBLIC DTD. As we have no official URI to put the DTD, I have put the
attached one on my personal site for testing PUBLIC DOCTYPE. But is it
possible to put our DTD somewhere in SourceForge?
- Should we require all XML files to be valid.
* For this one, the DOCTYPE should only be used for files using
the new syntax. The files whithout the DOCTYPE will only be checked for
well forming.
* For now, we have only the applicationContext and the
servlet-definition in XML. Both are using the same DTD. Have I missing
somewhat?
I have transformed the old pagedlist bean definition to the new syntax
as it was the smallest I have. I tested it against the DTD as SYSTEM and
PUBLIC with XmlSpy. I have attached the two files to this mail.
Regards,
Jean-Pierre
> -----Message d'origine-----
> De : spr...@li...
> [mailto:spr...@li...]
> De la part de Rod Johnson
> Envoyé : jeudi 29 mai 2003 23:49
> À : spr...@li...
> Objet : [Springframework-developer] DTD
>
>
> I knew I forgot some further questions:
>
> - Where should the DTD go?
> - Should we require all XML files to be valid?
>
> - How long should I retain the present backward compatibility
> in parsing XML? 0.8? 0.9? Break it now?
>
> Regards,
> Rod
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: eBay
> Get office equipment for less on eBay!
> http://adfarm.mediaplex.com/ad/ck/711-11697-> 6916-5
>
> _______________________________________________
>
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
|