On 2/15/08, Joerg Heinicke <[EMAIL PROTECTED]> wrote: > <solprovider <at> apache.org> writes: > > > This just does not work. Selector has to be outside of transform. > > So this is by design. Why? Should this be changed? > > > Can this be fixed? Cocoon processes inside-out so child elements are > > processed before the parent. This function seems obvious. I did not > > notice any warnings in the documentation. I have not yet researched > > why this does not work. Any suggestions? > > I see how it would help you in your case. I don't consider it a good idea > though. A pipeline is about putting components together, so components are > kind > of atomic units. What you want to do is to change component configuration. > This > does not "feel right". You also can not put an if statement into a method > call > in Java. The alternative in Java is the conditional operator [1]. In Cocoon > you > therefore have input modules :-) > > Joerg > [1] > http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.25
Java has conditional operators. Java also has variables. Cocoon has matchers, selectors, and some actions that allow conditional processing. Cocoon makes using variables very difficult. "A pipeline is about putting components together." This code is deciding which components should be put together. The XSLT needs to know which XMAPs are available to provide link options on a web page. Cocoon is a platform. Cocoon would be better if the pieces worked together. I might be the best Java programmer, but I prefer Cocoon not require custom Java components for basic functionality. This does not "feel right." Making basic map components not work together feels like more work than letting the parser handle each element. This feels like one line of code was left out of the code for parsing map:transform elements that should pass unknown (anything not map:parameter) elements to the main element processor. I could easily write a custom InputModule. Or a custom Transformer that checks the files . Or a custom Generator. Any of these would search for specific files and return the identifier so the page could create a URL to link to the verified function. The main code in any of these components would be: if(file1.exists()) return "file1"; else if (file2.exists()) return "file2"; else if ... Why should this be hardcoded into a custom component when the ResourceExists Selector already exists and can be configured in an XMAP? This thread verified that Cocoon-2.1.11 is broken. I will transfer this discussion to JIRA and the Dev ML. solprovider --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
