Hi,
I've finally got my XSP page generating XML from a database query, and it appears fine in my browser. My next question is, how can I configure AxKit to tranform this XML with an XSL sheet on my server? I've tried:
AxAddRootProcessor text/xsl addresses
where addresses is the root tag of the document that gets generated, but all that happens then is the source code for the XSP page is returned to the browser.
Two things:
First, the AxAddRootProcessor directive requires three arguments. They are, in order, the MIME type associated with the processor that will be used to apply the transformation, the path to the stylesheet that will be applied, and the name of the root element to match. You are missing the the path to the stylesheet.
Second, conditional processing directives (those that add style processors based on some aspect of the XML, like AxAddRootProcessor, AxAddDTDProcessor, etc.) are only evaluated against the contents of original source XML document, *not* the result of any transformation. So, to use an AxAddRootProcessor with your XSP document, you need to match against the top-level elements name of the *original* XSP page:
AxAddRootProcessor text/xsl /styles/somestyle.xsl \ {http://apache.org/xsp/core/v1}page
See the section on AxAddRootProcessor in the main AxKit manpage[2]
Also note that the same "only the source is examined" behavior applies to styles added via xml-stylesheet processing instruction as well. Only the PIs in the original source document are examined for matches, any PIs added as the result of a transformation will be ignored.
HTH, -kip
[1] http://www.axkit.org/wiki/view/AxKit/AxKit#
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
