[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Using XML output from Cocoon?
Hi there, This is my situation. I have a URI which ends at "publish/collection:**/file:**/xpath:**". I use cocoon to match on this pattern. Collection is the name of the document set. File is the name of the XML file I want to view, and Xpath is a Xpath Query which points to a node which I want to be highlighted. In the match I generate the xml file, and then I want to transform it with a XSLT file. I want to match a template with the given Xpath query. But variables in the match attribute are not allowed in XSLT. I tried using eXSLT, but no luck. It gives me the error "illegal tokens" (there are position tests in the Xpath query, and I think that's the problem). Anyway, I came up with a different idea. I want to preprocess the XSLT sheet so I'll have a XSLT sheet in which the Xpath query is set from the beginning, and doesn't have to be calculated on run-time (what doesn't work). I have made the following code in Cocoon (2.1.7): <map:pipeline> <map:match pattern="publish/collection:**/file:**/xpath:**"> <map:generate type="file" src="preprocess.xsl"/> <map:transform src="preprocessor.xsl"> <map:parameter name="xpath" value="{3}"/> </map:transform> <map:serialize type="xml"/> </map:match> </map:pipeline> This piece of code should output a XSLT sheet which I can use to transform the XML file. Now my question is: how?! I can not simple put a generate and a transform elelement after the serialize, cause then I get an error saying that I have already defined a generator. I hope somebody can help me. Other suggestions are of course welcome too! Kind regards, Karel.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|