I'm using AxKit::XSP::PerForm for the first time.
- the included perform_html.xsl file is incomplete, it misses the following template:
<xsl:template match="file_upload">
<input type="file" name="[EMAIL PROTECTED]|[EMAIL PROTECTED]|index}">
<xsl:if test="@accept or accept/text()">
<xsl:attribute name="accept"><xsl:value-of select="@accept|accept"/></xsl:attribute>
</xsl:if>
</input>
<xsl:apply-templates select="error"/>
</xsl:template>
- I have problems with xsl:import.
Ok, there are 3 ways using perform_html.xsl:
(1) using it directly: cp perform_html.xsl perfhtmlcopy.xsl; remove comment around the default template, and put above file_upload template into perfhtmlcopy.xsl. This works.
(2) using an own stylesheet.xsl, and <xsl:include href="perform_html.xsl"/>. This works as well.
(3) using an own stylesheet.xsl, and <xsl:import href="perform_html.xsl"/>. This does not work, the html output looks like the perform_html.xsl would not have been seen at all.
No error in the logs, just these debug messages: ... LibXSLT match_uri: /xsl/perform_html.xsl LibXSLT open_content_uri: /xsl/perform_html.xsl Style Provider Override: Apache::AxKit::Provider::File decoding from UTF-8 [req] File Provider given $r: /home/dav/Site1_dev/xsl/perform_html.xsl encoding to UTF-8 [LibXSLT] performing transformation ...
So libxslt fetches the xsl:import'ed sheet, but then does just as it has not seen it at all and only applies the templates from the parent sheet.
This is my parent sheet: is the default template a problem?:
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="/xsl/perform_html.xsl"/>
<xsl:output method="html" encoding="iso-8859-1"/>
<xsl:template match="*|@*"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template>
<xsl:template match="file_upload">
<input type="file" name="[EMAIL PROTECTED]|[EMAIL PROTECTED]|index}">
<xsl:if test="@accept or accept/text()">
<xsl:attribute name="accept"><xsl:value-of select="@accept|accept"/></xsl:attribute>
</xsl:if>
</input>
<xsl:apply-templates select="error"/>
</xsl:template>
<xsl:template match="error"> <span class="form_error">FFF <xsl:value-of select="."/></span> </xsl:template>
</xsl:stylesheet>
Thanks for any enlightment christian.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
