|
From: Rod J. <rod...@in...> - 2003-05-29 21:47:39
|
I've checked a preliminary DTD for beans definitions into the root directory of Spring main. - improvements/abuse welcome...it's a while since I've written a DTD - I'm having problems getting the XmlBeanFactory to validate against it. When I call setValidating(true) on the DocumentBuilderFactory, it goes and checks the DTD exists and can be parsed, but doesn't actually check structure against it, as far as I can see. Can anyone shed any light on this? I guess we could use schema, but this seems overkill for such a simple structure to my mind. Regards, Rod |
|
From: Rod J. <rod...@in...> - 2003-05-29 21:50:29
|
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 |
|
From: <tri...@tr...> - 2003-05-30 01:29:51
|
Rod, I vote for breaking backward compatibility now, before the first release. As soon as you release a deprecated feature, you know that there is always someone that is going to use it and later complain when it is gone :-) As for the DTD, could it go in the package where the DocumentBuilderFactory lives? If the XML files are not valid, how are you going to use them - guess what is missing? I'd say force them to be valid as long as whe throw a clearly worded exception if they are not. --Thomas > 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 > |
|
From: JP P. <jp....@ti...> - 2003-05-30 02:00:46
|
Hi Rod, I agree with Thomas for breaking backward compatibility now. As long as it is not released, only a few people have to change their files. For validating: it has to be checked how the parser retrieve the DTD based on its name (before the URI). It's normally parser dependent. The URI gives a chance to found it anyway. This name has to be fixed using the convention "-//<organisation>//<format inside the organisation>//<language>". Jean-Pierre > -----Message d'origine----- > De : spr...@li...=20 > [mailto:spr...@li...] > De la part de tri...@tr... > Envoy=E9 : vendredi 30 mai 2003 03:31 > =C0 : Rod Johnson > Cc : spr...@li... > Objet : Re: [Springframework-developer] DTD >=20 >=20 > Rod, >=20 > I vote for breaking backward compatibility now, before the=20 > first release. As soon as you release a deprecated feature,=20 > you know that there is always someone that is going to use it=20 > and later complain when it is gone :-) >=20 > As for the DTD, could it go in the package where the=20 > DocumentBuilderFactory lives? If the XML files are not=20 > valid, how are you going to use them - guess what is missing?=20 > I'd say force them to be valid as long as whe throw a=20 > clearly worded exception if they are not. >=20 > --Thomas >=20 >=20 > > I knew I forgot some further questions: > >=20 > > - Where should the DTD go? > > - Should we require all XML files to be valid? > >=20 > > - How long should I retain the present backward compatibility in=20 > > parsing XML? 0.8? 0.9? Break it now? > >=20 > > Regards, > > Rod > >=20 > >=20 > >=20 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.net email is sponsored by: eBay > > Get office equipment for less on eBay!=20 > > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > > _______________________________________________ > > Springframework-developer mailing list=20 > > Spr...@li... > >=20 > https://lists.sourceforge.net/lists/listinfo/s> pringframework-developer > >=20 >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay!=20 > http://adfarm.mediaplex.com/ad/ck/711-11697-> 6916-5 >=20 > _______________________________________________ >=20 > Springframework-developer mailing list=20 > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 |
|
From: JP P. <jp....@ti...> - 2003-05-30 01:34:40
Attachments:
pagedlist-servlet.xml
spring-beans_0_8.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 =20 > -----Message d'origine----- > De : spr...@li...=20 > [mailto:spr...@li...] > De la part de Rod Johnson > Envoy=E9 : jeudi 29 mai 2003 23:49 > =C0 : spr...@li... > Objet : [Springframework-developer] DTD >=20 >=20 > I knew I forgot some further questions: >=20 > - Where should the DTD go? > - Should we require all XML files to be valid? >=20 > - How long should I retain the present backward compatibility=20 > in parsing XML? 0.8? 0.9? Break it now? >=20 > Regards, > Rod >=20 >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay!=20 > http://adfarm.mediaplex.com/ad/ck/711-11697-> 6916-5 >=20 > _______________________________________________ >=20 > Springframework-developer mailing list=20 > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 |
|
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
>
|
|
From: JP P. <jp....@ti...> - 2003-05-30 08:38:14
|
Rod, - Juergen has advanced on DTD retrieving. - I will try to examine the behavior of the code. - Mappings Yes, what I made is the more stupid. Nevertheless, I didn't see that our DTD doesn't solve the main issue in our xml file. It will be very difficult to explain why a property style comes in the middle of the xml. This irritate me and will surely provoquing a bunch of criticisms. XMl can aceept it, but not understand. Imagine that a user will not have an equality sign in a line or have many or if lines were assembled. In all these cases, the document will be valid! It's not clean, we have to rest in a unique logic even if it's a little more verbose. My proposal is to create a third subelement of property, saying map, not mixable with others. <property name=3D"mappings"> <map key=3D"/welcome.html">pagedListController</value> <map key=3D"/detail.html">pagedListController</value> </property> And in the DTD <!ELEMENT property ((value | ref)+ | map+)> ... <!ELEMENT map (#PCDATA)> <!ATTLIST map key CDATA #REQUIRED > > -----Message d'origine----- > De : spr...@li...=20 > [mailto:spr...@li...] > De la part de Rod Johnson > Envoy=E9 : vendredi 30 mai 2003 09:49 > =C0 : JP Pawlak; spr...@li... > Objet : Re: [Springframework-developer] DTD >=20 >=20 > JP, >=20 > Thanks for this. And thanks for putting the DTD on your=20 > website so we can test PUBLIC. >=20 > Yes, all files use the same DTD. It's also possible to use a=20 > standalone bean factory (for example in a Swing app or=20 > command-line app). >=20 > You're correct: I forgot the singleton attribute. Optional,=20 > default is "true". I'll add this tonight. >=20 > Either class or parent att is required. Unfortunately I don't=20 > think DTD allows this kind of control. The class attribute=20 > will be "inherited" from ancestor definitions. This is useful=20 > when one bean's properties are used as a basis for other definitions. >=20 > We need a definitive home for the DTD, but I guess that will=20 > be part of the website. However, there must be a fallback=20 > option so that users can validate without being online (this=20 > can be a big irritation). >=20 > I still can't get proper validation, even against your public=20 > DTD. I'm using the following code: >=20 > DocumentBuilderFactory factory =3D = DocumentBuilderFactory.newInstance(); > factory.setValidating(true); > DocumentBuilder db =3D factory.newDocumentBuilder(); > Document doc =3D db.parse(is); >=20 > One note about your changed XML file: >=20 > Your change to map properties is over-enthusiastic: >=20 > <property name=3D"mappings"> > <value>/welcome.html=3DpagedListController</value> > <value>/detail.html=3DpagedListController</value> > </property> >=20 > This is only one value, parsed by the relevant PropertyEditor: >=20 > <value> > /welcome.html=3DpagedListController > /detail.html=3DpagedListController > </value> >=20 >=20 > Thomas, Isabelle: >=20 > I agree about breaking compatibility now. I would like to=20 > enforce validation in all cases, but we'd have to solve how=20 > to get the DTD locally. >=20 > Regards, > Rod >=20 >=20 > ----- Original Message ----- > From: "JP Pawlak" <jp....@ti...> > To: "'Rod Johnson'" <rod...@in...>;=20 > <spr...@li...> > Sent: Friday, May 30, 2003 2:34 AM > Subject: RE : [Springframework-developer] DTD >=20 >=20 > Hi Rod, >=20 > First, some remarks: > - You have changed the attribute of ref elements from refid=20 > to bean. It's better, but has to be noticed. > - It seems you forgot the singleton attribute. I don't=20 > remember its default value. It will be better set the DEFAULT=20 > in the DTD. > - Can really the class attribute be omitted for beans? > - Where should be the DTD? Clearly somewhere in the jar.=20 > Perhaps in a ressource directory. I don't remember what is to=20 > do to retrieve locally a PUBLIC DTD. As we have no official=20 > URI to put the DTD, I have put the attached one on my=20 > personal site for testing PUBLIC DOCTYPE. But is it possible=20 > 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=20 > using the new syntax. The files whithout the DOCTYPE will=20 > only be checked for well forming. > * For now, we have only the applicationContext and the=20 > servlet-definition in XML. Both are using the same DTD. Have=20 > I missing somewhat? >=20 > I have transformed the old pagedlist bean definition to the=20 > new syntax as it was the smallest I have. I tested it against=20 > the DTD as SYSTEM and PUBLIC with XmlSpy. I have attached the=20 > two files to this mail. >=20 > Regards, > Jean-Pierre >=20 >=20 > > -----Message d'origine----- > > De : spr...@li... > > [mailto:spr...@li...] > > De la part de Rod Johnson > > Envoy=E9 : jeudi 29 mai 2003 23:49 > > =C0 : 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=20 > > 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!=20 > > http://adfarm.mediaplex.com/ad/ck/711-11697-> 6916-5 > > > > _______________________________________________ > > > > Springframework-developer mailing list=20 > > Spr...@li... > >=20 > https://lists.sourceforge.net/lists/listinfo/s> pringframework-developer > > >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay!=20 > http://adfarm.mediaplex.com/ad/ck/711-11697-> 6916-5 >=20 > _______________________________________________ >=20 > Springframework-developer mailing list=20 > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 |
|
From: Isabelle M. <isa...@me...> - 2003-05-30 07:23:05
|
Hi everyone, Sorry for missing yesterday's discussion, but I'm fine too and vote for breaking compatibility before release. Isabelle -- Isabelle Muszynski Software Engineer Zandweellaan 4 2660 Antwerpen Belgium Tel. 32-(0)3-830 18 54 Mobile: 32-(0)485 49 50 89 Email: isa...@me... Website: www.meta-logix.com |
|
From: Rod J. <rod...@in...> - 2003-06-06 09:11:35
|
I've changed the <collection> tag to <list>. Simpler to type and more expressive, as it returns a list. Also we now have map support. Values can be references. We have properties support with a new props/prop tag. We should be able to change to this more structured representation instead of relying on the string property editor. This just means changing XML files, not code. See collections.xml (XML bean factory tests) for examples of all new elements. Regards, Rod |
|
From: Rod J. <rod...@in...> - 2003-08-11 19:56:12
|
I've just checked in a new version of the beans DTD. There are no functional changes, but it has much improved Javadoc. Can we please get the latest version from CVS onto our website--it should help users get to grips with beans XML files. Regards, Rod |
|
From: <tri...@tr...> - 2003-08-11 20:57:33
|
Rod, > I've just checked in a new version of the beans DTD. There are no functional > changes, but it has much improved Javadoc. > > Can we please get the latest version from CVS onto our website--it should > help users get to grips with beans XML files. > It's there now. Thomas |