Hello Hubert,
Hubert Holtz wrote:
Hy,
I hope this is the right forum for my question, but I think the answer has
something to do with XSL.
I don't know know how to open new XML files with a certain XSL file with
the help of XSP and my Mysql database in Cocoon.
the Cocoon users list is a more appropriate forum for such a question:
http://xml.apache.org/cocoon/mail-lists.html.
I have a table called sites with an column for id,lang,XML,XSL, in my xsp-
file I have a string-array called parameters where the 2 parameters of
the typed url (e.g. blablabla.com/main.xsp?id=220&lang=eng ) are
saved.
Depending on these two parameters I want to process the certain XML file
with the XSL file which are in my database(as a link of course).
It sounds like the parameters must be passed to the sitemap for creating
the correct pipeline. Therefore you need an action, not an XSP.
example:
<!-- pass XML and XSL as param to the sitemap -->
<map:match pattern="*">
<map:act type="getXmlAndXSLFromRequest">
<map:generate src="cocoon:/DB{xmlFromRequest}"/>
<map:transform src="cocoon:/DB{xslFromRequest}"/>
</map:act>
<map:serialize/>
</map:match>
<!-- get XML or XSL from DB - in which way ever -->
<map:match pattern="DB*">
<map:generate/>
<map:serialize type="xml"/>
</map:match>
This is only one approach, maybe there are better ones. Ask on Cocoon
users list, because this question has not much to do with XSLT.
Regards,
Joerg
Any idea how to manage this?
I can output the values of the parameters, that's not the problem, but how
do I say Cocoon that it has to process these two files from my database?
Any suggestions or examples or links are welcome.
Thanks.
Homer30
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list