We could use some help from the XInclude/Cinclude experts for the problem Oliver is trying to solve.
----- Original Message ----- From: "Andrew C. Oliver" <[EMAIL PROTECTED]> To: "cocoon users" <[EMAIL PROTECTED]> Sent: Sunday, July 07, 2002 12:17 PM Subject: Re: including dynamic data with XMLForm > Hi Ivelin, > > Thanks for your reply. > > This isn't quite quite working. It seems to insist on resolving to a > file. > > ERROR (2002-07-07) 09:08.29:743 [sitemap] > (/cocoon/samples/bringmethis/action/postrequest.html) > Thread-45/XIncludeTransformer: Error in processXIncludeElement > org.apache.cocoon.ResourceNotFoundException: Resource not found.: > org.apache.excalibur.source.SourceNotFoundException: Resource not found > file:/opt/tomcat/webapps/cocoon/samples/bringmethis/content/form/categories_ combo.xml > > My xinclude statement reads currently as follows: > > > > <map:match pattern="action/categories_combo.xml"> > <map:generate src="content/dynamic/categories.xsp" > type="serverpages"/> > <map:transform src="stylesheets/categories2combo.xsl"/> > <map:serialize type="html"/> > </map:match> > > > my xform page reads: > > <xf:selectMany ref="/category" selectUIType="listbox"> > <xf:caption>Category</xf:caption> > <xi:include > href="categories_combo.xml#xpointer(/xformcategories)"/> > <xf:violations class="error"/> > </xf:selectMany> > > > (this isn't exactly where I want it but I figured I'd move back if I got > it working). > > Note the pointer is because I need to have a root element to make the > document valid. I'd rather not make my root element the selectMany. > > Thanks, > > Andy > > > On Sat, 2002-07-06 at 16:39, Ivelin Ivanov wrote: > > > > One option is to use the XInclude transformer. > > > > Say you have > > > > <xf:selectMany ref="/role" selectUIType='listbox'> > > <xf:caption>Professional roles</xf:caption> > > > > <xf:item> > > <xf:caption>Geek</xf:caption> > > <xf:value>Geek</xf:value> > > </xf:item> > > <xf:item> > > <xf:caption>Hacker</xf:caption> > > <xf:value>Hacker</xf:value> > > </xf:item> > > .... > > > > </xf:selectMany> > > > > > > Now you can replace the items section with an xinlude section. > > > > > > <xf:selectMany ref="/role" selectUIType='listbox'> > > > > <xi:include href="myresources/dynamicRolesList.xml"/> > > > > </xf:selectMany> > > > > > > Where dynamicRolesList.xml can be any resolvable resource (not just an xml > > file). > > You would probably use an internal sitemap resource to generate the xml from > > the db. > > > > The sitemap ordering is important. XIncludeTransformer has to come before > > the XMLFormTransformer. > > > > ... > > <map:transform type="xinclude"/> > > <map:transform type="xmlform"/> > > ... > > > > > > > > If this satisfies your response, prefix your reply with SUMMARY, so that the > > doc team can include it in the FAQ. > > > > > > Ivelin > > > > ----- Original Message ----- > > From: "Andrew C. Oliver" <[EMAIL PROTECTED]> > > To: "cocoon users" <[EMAIL PROTECTED]> > > Sent: Saturday, July 06, 2002 2:55 PM > > Subject: including dynamic data with XMLForm > > > > > > > Hi All, > > > > > > I'm trying to create a page where a multi-select list has options that > > > are populated from a database. What is not immediately clear to me is > > > how I can create an XMLForm page where the list contents are dynamically > > > generated. Any clues? > > > > > > -Andy > > > -- > > > http://www.superlinksoftware.com - software solutions for business > > > http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in > > > Java > > > http://krysalis.sourceforge.net/centipede - the best build/project > > > structure > > > a guy/gal could have! - Make Ant simple on complex Projects! > > > The avalanche has already started. It is too late for the pebbles to > > > vote. > > > -Ambassador Kosh > > > > > > > > > --------------------------------------------------------------------- > > > Please check that your question has not already been answered in the > > > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > > > > > > > --------------------------------------------------------------------- > > Please check that your question has not already been answered in the > > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > -- > http://www.superlinksoftware.com - software solutions for business > http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in > Java > http://krysalis.sourceforge.net/centipede - the best build/project > structure > a guy/gal could have! - Make Ant simple on complex Projects! > The avalanche has already started. It is too late for the pebbles to > vote. > -Ambassador Kosh > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>