|
From: <jue...@we...> - 2004-10-07 13:07:47
|
Another request to simply <property> usage in XML bean definitions: http://opensource.atlassian.com/projects/spring/browse/SPR-379 This time, it's not about considering CDATA inside = <property>...</property> as value, but rather about further attributes = for the <property> tag itself: <property name=3D"user" value=3D"admin"/>=20 <property name=3D"linkFormatter" bean=3D"linkFormatter"/>=20 I'd probably name the bean reference attributes differently, i.e. = "ref-bean" respectively "ref-local". But the general idea is not bad - = it's cleaner than the CDATA-as-value suggestion, I guess. Let's compare the currently necessary markup: <property name=3D"user"><value>admin</value></property> <property name=3D"linkFormatter"><ref = bean=3D"linkFormatter"/></property> Which is clearly more verbose, even if not too much. The main advantage = of the attribute version is that it avoids closing tags completely. Thoughts? Juergen |
|
From: Dmitriy K. <dko...@ru...> - 2004-10-07 13:30:53
|
I kinda like property's attributes version. More concise. Dmitriy. jürgen höller [werk3AT] wrote: >Another request to simply <property> usage in XML bean definitions: > > http://opensource.atlassian.com/projects/spring/browse/SPR-379 > >This time, it's not about considering CDATA inside <property>...</property> as value, but rather about further attributes for the <property> tag itself: > > <property name="user" value="admin"/> > <property name="linkFormatter" bean="linkFormatter"/> > >I'd probably name the bean reference attributes differently, i.e. "ref-bean" respectively "ref-local". But the general idea is not bad - it's cleaner than the CDATA-as-value suggestion, I guess. > >Let's compare the currently necessary markup: > > <property name="user"><value>admin</value></property> > <property name="linkFormatter"><ref bean="linkFormatter"/></property> > >Which is clearly more verbose, even if not too much. The main advantage of the attribute version is that it avoids closing tags completely. > >Thoughts? > >Juergen > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >Use IT products in your business? Tell us what you think of them. Give us >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |
|
From: R.J. L. <rjl...@co...> - 2004-10-07 18:20:45
|
That's definitely nice, especially when you don't need room for anything = but a simple string or bean name. R.J.=20 -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of Dmitriy Kopylenko Sent: Thursday, October 07, 2004 8:31 AM To: spr...@li... Subject: Re: [Springframework-developer] Simplify typical xml setup = syntax I kinda like property's attributes version. More concise. Dmitriy. j=FCrgen h=F6ller [werk3AT] wrote: >Another request to simply <property> usage in XML bean definitions: > > http://opensource.atlassian.com/projects/spring/browse/SPR-379 > >This time, it's not about considering CDATA inside = <property>...</property> as value, but rather about further attributes for the <property> tag = itself: > > <property name=3D"user" value=3D"admin"/> <property = name=3D"linkFormatter"=20 > bean=3D"linkFormatter"/> > >I'd probably name the bean reference attributes differently, i.e. "ref-bean" respectively "ref-local". But the general idea is not bad - = it's cleaner than the CDATA-as-value suggestion, I guess. > >Let's compare the currently necessary markup: > > <property name=3D"user"><value>admin</value></property> > <property name=3D"linkFormatter"><ref = bean=3D"linkFormatter"/></property> > >Which is clearly more verbose, even if not too much. The main advantage = of the attribute version is that it avoids closing tags completely. > >Thoughts? > >Juergen > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on=20 >ITManagersJournal Use IT products in your business? Tell us what you=20 >think of them. Give us Your Opinions, Get Free ThinkGeek Gift=20 >Certificates! Click to find out more=20 >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > =20 > ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal = Use IT products in your business? Tell us what you think of them. Give us = Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Aleksei G. <ne...@ka...> - 2004-10-07 13:31:50
|
On Thu, 7 Oct 2004 15:09:01 +0200, jürgen höller [werk3AT] <jue...@we...> wrote: > Another request to simply <property> usage in XML bean definitions: > > http://opensource.atlassian.com/projects/spring/browse/SPR-379 > > This time, it's not about considering CDATA inside > <property>...</property> as value, but rather about further attributes > for the <property> tag itself: > > <property name="user" value="admin"/> > <property name="linkFormatter" bean="linkFormatter"/> > > I'd probably name the bean reference attributes differently, i.e. > "ref-bean" respectively "ref-local". But the general idea is not bad - > it's cleaner than the CDATA-as-value suggestion, I guess. > > Let's compare the currently necessary markup: > > <property name="user"><value>admin</value></property> > <property name="linkFormatter"><ref bean="linkFormatter"/></property> > > Which is clearly more verbose, even if not too much. The main advantage > of the attribute version is that it avoids closing tags completely. > > Thoughts? This is really good idea - better than CDATA-as-value with even less typing - and we still will have pretty strict DTD! -- //regards, neuro |
|
From: Artur K. <kar...@as...> - 2004-10-07 15:23:54
|
jürgen höller [werk3AT] wrote: > Another request to simply <property> usage in XML bean definitions: > > http://opensource.atlassian.com/projects/spring/browse/SPR-379 > > This time, it's not about considering CDATA inside > <property>...</property> as value, but rather about further attributes for > the <property> tag itself: > > <property name="user" value="admin"/> > <property name="linkFormatter" bean="linkFormatter"/> +1 I just thought about something like this. Artur |
|
From: Seth L. <set...@gm...> - 2004-10-07 18:33:53
|
On Thu, 7 Oct 2004 15:09:01 +0200, j=FCrgen h=F6ller [ werk3AT ] <jue...@we...> wrote: > Another request to simply <property> usage in XML bean definitions: >=20 > http://opensource.atlassian.com/projects/spring/browse/SPR-379 >=20 > This time, it's not about considering CDATA inside <property>...</propert= y> as value, but rather about further attributes for the <property> tag its= elf: >=20 > <property name=3D"user" value=3D"admin"/> > <property name=3D"linkFormatter" bean=3D"linkFormatter"/> +1 on this. Although, can the DTD say that value OR bean but not both? Seth |
|
From: Olivier J. <oli...@pc...> - 2004-10-07 19:40:37
|
>+1 on this. Although, can the DTD say that value OR bean but not both? > > > Nope, the dtd isn't enough, nor xsd but relaxNG can. Still, I am for the attribute extension >Seth > > Olivier |
|
From: R.J. L. <rjl...@co...> - 2004-10-07 19:48:14
|
I read in the DTD: " As the format is simple, a DTD is sufficient, and there's no need for a schema at this point." ... But I thought for the heck of it I would try to come up with a = schema that addressed the shortcomings that will be in the DTD if this new = style of property tag was introduced. I think I have come up with one = implementation, although it seems filled with hacks to get around the shortcomings in = XSDs. I only implemented the theoretical discussions from today, so a lot of = the tags aren't defined completely - not to mention the fact that I didn't = test this implementation; I just relied on my prior experience regarding = schemas. It is nasty to look at, but given some tweaking it should be a correct implementation that covers the two concerns brought up by Winter (it shouldn't be possible to implement both attribute and element style = property values) and Seth (each attribute should be mutually exclusive in the attribute style property tag). <xs:element name=3D"bean"> <xs:complexType> <xs:group minOccurs=3D"0" maxOccurs=3D"unbounded"> <xs:choice> <!-- Hack 1: elements with the same name can't share a 'choice' namespace in a schema (or sequence or group for that matter), so the sequence=20 tags have to be used to separate them. --> <xs:sequence> <xs:element name=3D"property" type=3D"beanAttrStyleProperty"/> </xs:sequence> <xs:sequence> <xs:element name=3D"property" type=3D"localAttrStyleProperty"/> </xs:sequence> <xs:sequence> <xs:element name=3D"property" type=3D"valueStyleProperty"/> </xs:sequence> <xs:sequence> <xs:element name=3D"property" type=3D"elemStyleProperty"/> </xs:sequence> </xs:choice> </xs:group> </xs:complexType> </xs:element> <!--=20 Hack 2: there is no 'attributeChoice' style tag, so=20 a different property type has to be hacked out=20 for each attribute combination (biggest oversight in XSDs I think). --> <xs:complexType name=3D"beanAttrStyleProperty"> <xs:attribute name=3D"ref-bean" type=3D"xs:string"/>=09 </xs:complexType> <xs:complexType name=3D"localAttrStyleProperty"> <xs:attribute name=3D"ref-bean" type=3D"xs:string"/>=09 </xs:complexType> <xs:complexType name=3D"valueAttrStyleProperty"> <xs:attribute name=3D"value" type=3D"xs:string"/>=09 </xs:complexType> <xs:complexType name=3D"elemStyleProperty"> <xs:choice> <!--=20 Hack 1 and Hack 2 Combined: Here is another example of the two different hacks employed=20 above, this time in a nested (inline) format. --> <xs:sequence> <xs:element name=3D"ref"> <xs:complexType> <xs:attribute name=3D"bean" type=3D"xs:string"/> </xs:complexType> </xs:element> </xs:sequence> <xs:sequence> <xs:element name=3D"ref"> <xs:complexType> <xs:attribute name=3D"local" type=3D"xs:string"/> </xs:complexType> </xs:element> </xs:sequence> <xs:element name=3D"value" type=3D"xs:string"/> </xs:choice> </xs:complexType> --- As I said, this isn't tested - it's really just an academic exercise. = That being said, it does look like full schema validation would be possible = even though (I don't believe) full DTD validation would be possible. R.J. -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of Seth Ladd Sent: Thursday, October 07, 2004 1:34 PM To: spr...@li... Subject: Re: [Springframework-developer] Simplify typical xml setup = syntax On Thu, 7 Oct 2004 15:09:01 +0200, j=FCrgen h=F6ller [ werk3AT ] <jue...@we...> wrote: > Another request to simply <property> usage in XML bean definitions: >=20 > http://opensource.atlassian.com/projects/spring/browse/SPR-379 >=20 > This time, it's not about considering CDATA inside <property>...</property> as value, but rather about further attributes = for the <property> tag itself: >=20 > <property name=3D"user" value=3D"admin"/> > <property name=3D"linkFormatter" bean=3D"linkFormatter"/> +1 on this. Although, can the DTD say that value OR bean but not both? Seth ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal = Use IT products in your business? Tell us what you think of them. Give us = Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: R.J. L. <rjl...@co...> - 2004-10-07 20:44:58
|
For those of you who read this, I made a typo - the 2nd xs:complexType 'ref-bean' value should be 'ref-local' - fixed in the reply text below! Thanks, R.J.=20 -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of R.J. Lorimer Sent: Thursday, October 07, 2004 2:48 PM To: spr...@li... Subject: RE: [Springframework-developer] Simplify typical xml setup = syntax I read in the DTD: " As the format is simple, a DTD is sufficient, and there's no need for a schema at this point." ... But I thought for the heck of it I would try to come up with a = schema that addressed the shortcomings that will be in the DTD if this new = style of property tag was introduced. I think I have come up with one = implementation, although it seems filled with hacks to get around the shortcomings in = XSDs. I only implemented the theoretical discussions from today, so a lot of = the tags aren't defined completely - not to mention the fact that I didn't = test this implementation; I just relied on my prior experience regarding = schemas. It is nasty to look at, but given some tweaking it should be a correct implementation that covers the two concerns brought up by Winter (it shouldn't be possible to implement both attribute and element style = property values) and Seth (each attribute should be mutually exclusive in the attribute style property tag). <xs:element name=3D"bean"> <xs:complexType> <xs:group minOccurs=3D"0" maxOccurs=3D"unbounded"> <xs:choice> <!-- Hack 1: elements with the same name can't share a 'choice' namespace in a schema (or sequence or group for that matter), so the sequence=20 tags have to be used to separate them. --> <xs:sequence> <xs:element name=3D"property" type=3D"beanAttrStyleProperty"/> </xs:sequence> <xs:sequence> <xs:element name=3D"property" type=3D"localAttrStyleProperty"/> </xs:sequence> <xs:sequence> <xs:element name=3D"property" type=3D"valueStyleProperty"/> </xs:sequence> <xs:sequence> <xs:element name=3D"property" type=3D"elemStyleProperty"/> </xs:sequence> </xs:choice> </xs:group> </xs:complexType> </xs:element> <!--=20 Hack 2: there is no 'attributeChoice' style tag, so=20 a different property type has to be hacked out=20 for each attribute combination (biggest oversight in XSDs I think). --> <xs:complexType name=3D"beanAttrStyleProperty"> <xs:attribute name=3D"ref-bean" type=3D"xs:string"/>=09 </xs:complexType> <xs:complexType name=3D"localAttrStyleProperty"> <xs:attribute name=3D"ref-local" type=3D"xs:string"/>=09 </xs:complexType> <xs:complexType name=3D"valueAttrStyleProperty"> <xs:attribute name=3D"value" type=3D"xs:string"/>=09 </xs:complexType> <xs:complexType name=3D"elemStyleProperty"> <xs:choice> <!--=20 Hack 1 and Hack 2 Combined: Here is another example of the two different hacks employed=20 above, this time in a nested (inline) format. --> <xs:sequence> <xs:element name=3D"ref"> <xs:complexType> <xs:attribute name=3D"bean" type=3D"xs:string"/> </xs:complexType> </xs:element> </xs:sequence> <xs:sequence> <xs:element name=3D"ref"> <xs:complexType> <xs:attribute name=3D"local" type=3D"xs:string"/> </xs:complexType> </xs:element> </xs:sequence> <xs:element name=3D"value" type=3D"xs:string"/> </xs:choice> </xs:complexType> --- As I said, this isn't tested - it's really just an academic exercise. = That being said, it does look like full schema validation would be possible = even though (I don't believe) full DTD validation would be possible. R.J. -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of Seth Ladd Sent: Thursday, October 07, 2004 1:34 PM To: spr...@li... Subject: Re: [Springframework-developer] Simplify typical xml setup = syntax On Thu, 7 Oct 2004 15:09:01 +0200, j=FCrgen h=F6ller [ werk3AT ] <jue...@we...> wrote: > Another request to simply <property> usage in XML bean definitions: >=20 > http://opensource.atlassian.com/projects/spring/browse/SPR-379 >=20 > This time, it's not about considering CDATA inside <property>...</property> as value, but rather about further attributes = for the <property> tag itself: >=20 > <property name=3D"user" value=3D"admin"/> > <property name=3D"linkFormatter" bean=3D"linkFormatter"/> +1 on this. Although, can the DTD say that value OR bean but not both? Seth ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal = Use IT products in your business? Tell us what you think of them. Give us = Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal = Use IT products in your business? Tell us what you think of them. Give us = Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |