|
From: <jue...@we...> - 2004-06-25 18:27:43
|
Sounds plausible. I'm no XML expert, though: How could we make this = work? =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Timo Verhoeven Gesendet: Fr 25.06.2004 19:33 An: spr...@li... Betreff: Re: [Springframework-developer] Include/import directive in XML = bean definition files Hi! Why not use standardized XInclude syntax? It would look like this: <beans xnlns:xi=3D"http://www.w3.org/2001/XInclude"> ... <xi:include href=3D"anyURL"/> ... </beans> XInclude supports inclusion of xml and text data; thus it could replace annoying CDATA sections. Regards, Timo Am Freitag, 25. Juni 2004 19:06 schrieb j=FCrgen h=F6ller [werk3AT]: > Any thoughts on include/import directives in XML bean definition > files? > > http://opensource.atlassian.com/projects/spring/browse/SPR-137 > > This is about elements in XML bean definitions that allow to include > other XML bean definition files, with paths that are interpreted as > relative to the current file. Basically, this is an alternative to > combining multiple XML bean definition files via > "contextConfigLocation" parameters. > > Remaining questions are mostly about syntax. One possibility would be > like as follows: > > <beans> > > <include resource=3D"includeBeans.xml"/> > > <bean.../> > > </beans> > > Should the tag be called "include" or "import"? Any suggestions or > objections regarding such functionality in general? I'm personally > still a fan of "contextConfigLocation", but I guess there are valid > use cases for keeping includes directly in bean definition files. > > As a side note, one can already use standard XML entity includes to > achieve something similar. However, such include files are not full > DTD-compliant XML files themselves, and the XML include syntax is > rather awkward. > > <?xml version=3D"1.0" encoding=3D"UTF-8"?> > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" > "http://www.springframework.org/dtd/spring-beans.dtd > <http://www.springframework.org/dtd/spring-beans.dtd> " [ <!ENTITY > contextInclude SYSTEM > "org/springframework/web/context/WEB-INF/contextInclude.xml"> ]> > > <beans> > > &contextInclude; > > > <bean.../> > > </beans> > > I'd like to clarify our way to proceed with this ASAP, to get it into > 1.1 RC1 if we decide to adopt it. > > Juergen > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-develope >r ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Alef A. <al...@jt...> - 2004-06-25 21:50:51
|
How does the XInclude stuff retrieve the resources. Will it allow us to = specify resources in somewhat the same way as we do now (classpath:, = etcetera) and is it possible to integrate this with the resource package = we have? I think this would be a requirements. Alef > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On = Behalf > Of j=FCrgen h=F6ller [werk3AT] > Sent: Friday, June 25, 2004 8:31 PM > To: spr...@li... > Subject: Re: [Springframework-developer] Include/import directive in = XML > bean definition files >=20 > Sounds plausible. I'm no XML expert, though: How could we make this = work? >=20 > Juergen >=20 >=20 > ________________________________ >=20 > Von: spr...@li... im Auftrag = von > Timo Verhoeven > Gesendet: Fr 25.06.2004 19:33 > An: spr...@li... > Betreff: Re: [Springframework-developer] Include/import directive in = XML > bean definition files >=20 >=20 >=20 >=20 > Hi! >=20 > Why not use standardized XInclude syntax? It would look like this: >=20 > <beans xnlns:xi=3D"http://www.w3.org/2001/XInclude"> > ... > <xi:include href=3D"anyURL"/> > ... > </beans> >=20 > XInclude supports inclusion of xml and text data; thus it could = replace > annoying CDATA sections. >=20 > Regards, >=20 > Timo >=20 >=20 > Am Freitag, 25. Juni 2004 19:06 schrieb j=FCrgen h=F6ller [werk3AT]: > > Any thoughts on include/import directives in XML bean definition > > files? > > > > http://opensource.atlassian.com/projects/spring/browse/SPR-137 > > > > This is about elements in XML bean definitions that allow to include > > other XML bean definition files, with paths that are interpreted as > > relative to the current file. Basically, this is an alternative to > > combining multiple XML bean definition files via > > "contextConfigLocation" parameters. > > > > Remaining questions are mostly about syntax. One possibility would = be > > like as follows: > > > > <beans> > > > > <include resource=3D"includeBeans.xml"/> > > > > <bean.../> > > > > </beans> > > > > Should the tag be called "include" or "import"? Any suggestions or > > objections regarding such functionality in general? I'm personally > > still a fan of "contextConfigLocation", but I guess there are valid > > use cases for keeping includes directly in bean definition files. > > > > As a side note, one can already use standard XML entity includes to > > achieve something similar. However, such include files are not full > > DTD-compliant XML files themselves, and the XML include syntax is > > rather awkward. > > > > <?xml version=3D"1.0" encoding=3D"UTF-8"?> > > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" > > "http://www.springframework.org/dtd/spring-beans.dtd > > <http://www.springframework.org/dtd/spring-beans.dtd> " [ <!ENTITY > > contextInclude SYSTEM > > "org/springframework/web/context/WEB-INF/contextInclude.xml"> ]> > > > > <beans> > > > > &contextInclude; > > > > > > <bean.../> > > > > </beans> > > > > I'd like to clarify our way to proceed with this ASAP, to get it = into > > 1.1 RC1 if we decide to adopt it. > > > > Juergen > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by Black Hat Briefings & Training. > > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > > digital self defense, top technical experts, no vendor pitches, > > unmatched networking opportunities. Visit www.blackhat.com > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > = https://lists.sourceforge.net/lists/listinfo/springframework-develope > >r >=20 >=20 > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 |
|
From: Timo V. <sic...@gm...> - 2004-06-26 09:57:41
|
Alef, J=FCrgen,=20 I've done some research. The XInclude spec is quite short (in terms of=20 the W3C), http://www.w3.org/TR/xinclude/ . Digest: XInclude transforms the infoset, thus happens after parsing. XInclude=20 defines only two elements: include and fallback. Include uses IRIs=20 (Internationalized Resource Identifiers, essentially URIs) to reference=20 resources. It can import those resources as xml or text. In case of xml=20 it can use XPointer to include only portions of the resource.=20 > How does the XInclude stuff retrieve the resources. Will it allow us > to specify resources in somewhat the same way as we do now > (classpath:, etcetera) and is it possible to integrate this with the > resource package we have? AFAIK, IRIs/URIs can have application specific form. The XInclude spec=20 explicitly says=20 "The specifics of how an infoset is created are intentionally=20 unspecified, to allow for flexibility by implementations and to avoid=20 defining a particular processing model for components of the XML=20 architecture. Particulars of whether DTD or XML schema validation are=20 performed, for example, are not constrained by this specification." > > Sounds plausible. I'm no XML expert, though: How could we make this > > work? We "only" need a simple layer, which processes all XInclude elements of=20 the infoset (the parsed XML). I couldn't find a simple black box=20 solution, only this: =2D XIncluder, http://xincluder.sourceforge.net/ : Seems to be=20 unmaintained, not feature complete; nevertheless it's the basis for=20 some other projects (XOM, e.g.). =2D GNU JAXP, http://www.gnu.org/software/classpathx/jaxp/ : "includes a=20 SAX filter that resolves XIncludes, provided no XPointers are used" =2D Cocoon XInclude transformer,=20 http://cocoon.apache.org/2.1/userdocs/transformers/xinclude-transformer.htm= l :=20 Seems to be feature complete, but written for use in cocoon The Cocoon stuff might be worth reviewing. BTW, using DTDs for validation has a little drawback: DTDs are not=20 namespace aware. Thus an updated Spring DTD for XInclude would force=20 the user to use a fixed prefix (xi, e.g.). The example I posted was=20 "incorrect", since it defined a namespace in the <beans> tag. FYI, the=20 XInclude spec provides DTD templates (and an XML schema) for XInclude=20 usage: <!ELEMENT xi:include (xi:fallback?)> <!ATTLIST xi:include xmlns:xi CDATA #FIXED =20 "http://www.w3.org/2001/XInclude" href CDATA #IMPLIED parse (xml|text) "xml" xpointer CDATA #IMPLIED encoding CDATA #IMPLIED accept CDATA #IMPLIED accept-language CDATA #IMPLIED > <!ELEMENT xi:fallback ANY> <!ATTLIST xi:fallback xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude" > Regards, Timo |
|
From: Timo V. <sic...@gm...> - 2004-06-26 11:08:42
|
Forgot one implementation: Xerces, http://teaching.cs.uml.edu/xerces/docs/faq-xinclude.html, has initial support for XInclude as well Timo |
|
From: <jue...@we...> - 2004-06-28 08:20:46
|
For a start, we need to decide: - custom "include" element or XInclude support? - Spring 1.1 or 1.2 timeframe? =20 I personally prefer external config locations, and consider an "include" = element as purely optional feature, particularly given that XML entity = includes already work. I don't have a fixed opinion on the = implementation strategy yet; if there's no clear consensus on the actual = strategy within the next 2 weeks, I vote for moving this to Spring 1.2. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Timo Verhoeven Gesendet: Sa 26.06.2004 11:57 An: spr...@li... Betreff: Re: [Springframework-developer] Include/import directive in XML = bean definition files Alef, J=FCrgen, I've done some research. The XInclude spec is quite short (in terms of the W3C), http://www.w3.org/TR/xinclude/ . Digest: XInclude transforms the infoset, thus happens after parsing. XInclude defines only two elements: include and fallback. Include uses IRIs (Internationalized Resource Identifiers, essentially URIs) to reference resources. It can import those resources as xml or text. In case of xml it can use XPointer to include only portions of the resource. > How does the XInclude stuff retrieve the resources. Will it allow us > to specify resources in somewhat the same way as we do now > (classpath:, etcetera) and is it possible to integrate this with the > resource package we have? AFAIK, IRIs/URIs can have application specific form. The XInclude spec explicitly says "The specifics of how an infoset is created are intentionally unspecified, to allow for flexibility by implementations and to avoid defining a particular processing model for components of the XML architecture. Particulars of whether DTD or XML schema validation are performed, for example, are not constrained by this specification." > > Sounds plausible. I'm no XML expert, though: How could we make this > > work? We "only" need a simple layer, which processes all XInclude elements of the infoset (the parsed XML). I couldn't find a simple black box solution, only this: - XIncluder, http://xincluder.sourceforge.net/ : Seems to be unmaintained, not feature complete; nevertheless it's the basis for some other projects (XOM, e.g.). - GNU JAXP, http://www.gnu.org/software/classpathx/jaxp/ : "includes a SAX filter that resolves XIncludes, provided no XPointers are used" - Cocoon XInclude transformer, http://cocoon.apache.org/2.1/userdocs/transformers/xinclude-transformer.h= tml : Seems to be feature complete, but written for use in cocoon The Cocoon stuff might be worth reviewing. BTW, using DTDs for validation has a little drawback: DTDs are not namespace aware. Thus an updated Spring DTD for XInclude would force the user to use a fixed prefix (xi, e.g.). The example I posted was "incorrect", since it defined a namespace in the <beans> tag. FYI, the XInclude spec provides DTD templates (and an XML schema) for XInclude usage: <!ELEMENT xi:include (xi:fallback?)> <!ATTLIST xi:include xmlns:xi CDATA #FIXED =20 "http://www.w3.org/2001/XInclude" href CDATA #IMPLIED parse (xml|text) "xml" xpointer CDATA #IMPLIED encoding CDATA #IMPLIED accept CDATA #IMPLIED accept-language CDATA #IMPLIED > <!ELEMENT xi:fallback ANY> <!ATTLIST xi:fallback xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude" > Regards, Timo ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Colin S. <col...@ex...> - 2004-06-28 12:18:35
|
+1 jürgen höller [werk3AT] wrote: >For a start, we need to decide: >- custom "include" element or XInclude support? >- Spring 1.1 or 1.2 timeframe? > >I personally prefer external config locations, and consider an "include" element as purely optional feature, particularly given that XML entity includes already work. I don't have a fixed opinion on the implementation strategy yet; if there's no clear consensus on the actual strategy within the next 2 weeks, I vote for moving this to Spring 1.2. > >Juergen > > >________________________________ > >Von: spr...@li... im Auftrag von Timo Verhoeven >Gesendet: Sa 26.06.2004 11:57 >An: spr...@li... >Betreff: Re: [Springframework-developer] Include/import directive in XML bean definition files > > > > >Alef, Jürgen, > >I've done some research. The XInclude spec is quite short (in terms of >the W3C), http://www.w3.org/TR/xinclude/ . Digest: > >XInclude transforms the infoset, thus happens after parsing. XInclude >defines only two elements: include and fallback. Include uses IRIs >(Internationalized Resource Identifiers, essentially URIs) to reference >resources. It can import those resources as xml or text. In case of xml >it can use XPointer to include only portions of the resource. > > > >>How does the XInclude stuff retrieve the resources. Will it allow us >>to specify resources in somewhat the same way as we do now >>(classpath:, etcetera) and is it possible to integrate this with the >>resource package we have? >> >> > >AFAIK, IRIs/URIs can have application specific form. The XInclude spec >explicitly says > >"The specifics of how an infoset is created are intentionally >unspecified, to allow for flexibility by implementations and to avoid >defining a particular processing model for components of the XML >architecture. Particulars of whether DTD or XML schema validation are >performed, for example, are not constrained by this specification." > > > >>>Sounds plausible. I'm no XML expert, though: How could we make this >>>work? >>> >>> > >We "only" need a simple layer, which processes all XInclude elements of >the infoset (the parsed XML). I couldn't find a simple black box >solution, only this: > >- XIncluder, http://xincluder.sourceforge.net/ : Seems to be >unmaintained, not feature complete; nevertheless it's the basis for >some other projects (XOM, e.g.). > >- GNU JAXP, http://www.gnu.org/software/classpathx/jaxp/ : "includes a >SAX filter that resolves XIncludes, provided no XPointers are used" > >- Cocoon XInclude transformer, >http://cocoon.apache.org/2.1/userdocs/transformers/xinclude-transformer.html : >Seems to be feature complete, but written for use in cocoon > >The Cocoon stuff might be worth reviewing. > >BTW, using DTDs for validation has a little drawback: DTDs are not >namespace aware. Thus an updated Spring DTD for XInclude would force >the user to use a fixed prefix (xi, e.g.). The example I posted was >"incorrect", since it defined a namespace in the <beans> tag. FYI, the >XInclude spec provides DTD templates (and an XML schema) for XInclude >usage: > ><!ELEMENT xi:include (xi:fallback?)> ><!ATTLIST xi:include > xmlns:xi CDATA #FIXED >"http://www.w3.org/2001/XInclude" > href CDATA #IMPLIED > parse (xml|text) "xml" > xpointer CDATA #IMPLIED > encoding CDATA #IMPLIED > accept CDATA #IMPLIED > accept-language CDATA #IMPLIED > > > ><!ELEMENT xi:fallback ANY> ><!ATTLIST xi:fallback > xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude" > > > > >Regards, > >Timo > > |
|
From: Timo V. <sic...@gm...> - 2004-06-28 12:38:47
|
Am Montag, 28. Juni 2004 10:21 schrieb j=FCrgen h=F6ller [werk3AT]: > For a start, we need to decide: > - custom "include" element or XInclude support? I'd suggest a mix: Implement the custom solution as a single simple=20 filter class, which turns the parsed infoset into a new infoset=20 including includes, now. The syntax should be real XIncude but the=20 functionality only a subset (i.e. no XPointer, no parse as text, no=20 fixups [see spec] etc.), until a blackbox solution is available=20 somewhere else or until somebody writes it for spring. Then the filter=20 could simply be replaced, provding full XInclude support, while=20 retaining backwards-compatibility. Regards, Timo |