> > It is one of the projects that I looked at initially along > > with Chiba and ExForms. Appears that Schemox has been frozen > > back in 2000. Although it was presented on the Cocoon dev > > list an integrated solution never saw the light of day. > > Yes, there is no any activity at Infozone now and, AFAIK, they have never > finished integration with Cocoon 2.
yes, we mailed off the list quite some time ago when I was trying to get exformular (re)started > > That's why I keep saying we should try to finish the beast this time ! definitly :) > > To give everyone a heads up, I am now working on Java API for > > XML Schema and Schematron validation of JavaBeans, which can > > be easily used in the Action classes. The end goal is for > > these APIs to be merged with Torsten's code. hm... maybe I should commit what I already have into scratchpad although? this way we could better share the code... but actually I don't like to present something that's not yet ready (completely) working... what do you guys think? > That's cool! Waiting result with impatience. If Cocoon will have all > features needed for a form-based web application then a lot of people will > move from Struts to Cocoon. And I hope to move all our projects to Cocoon. I think so, too > > imagine code similar to: > > > > SchamatronValidator sv = new > > SchematronValidator("my-schema-report.xml"); > > sv.setXmlBinder( SomeCastorWrapper ); > > sv.setPhase("loginPhase"); ValidationResult vresult = > > sv.validate(myJavaBean); if (vresult.isEmpty() ) > > move on to db insert > > objectMap.setAttribut("validationSuccess", Boolean.TRUE); else > > { > > objectMap.setAttribut("validationSucces", Boolean.FALSE); > > session.setAttribute("validationResult", vresult); > > } After rethinking the whole stuff I have to admit I don't like the phase concept :( For SoC the phases should *not* be in the preceptor. The preceptor should not have to change if you move a textbox from one view into another. That's not a clean approach... > > > > then further in the pipeline: > > > > <selector > > <when test="validationSuccess"> > > render next page > > <otherwise> <!-- render the old page --> > > <transformer type="castor" src="page-with-errors.xml"/> > > <transformer src="xmlform2html.xsl/> > > This is the way Struts works (you know that, of course). Although Struts has > less verbose syntax for that: > <forward name="success" path="/otherResource"/> > <forward name="error" path="/errorResource"/> > > Maybe something like this can be added to sitemap syntax? What about a > 'test' attribute for every pipeline component? So, only those components > will be used whose 'test' expression will return true? > > This can be used also in action-sets to select actions to be performed. <snip/> > > How does that look? > > Looks fine, but in this case you'll have all your presentation logic in XSL, > which is not bad, but sometimes hard to customize and maintain. What about > of using XPath expressions with included beans to bind them to form elements > like it's done in XForms? <snip/> > Then a logicsheet/transformer can be used for something like this to bind > the data to form elements: > > <input ref="xmlform/field/value" .../> That's exactly what I am up to :) -- Torsten --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]