You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Geoff Reedy (JIRA)" <xa...@xml.apache.org> on 2007/04/18 15:57:20 UTC
[jira] Created: (XALANJ-2381) namespaces are dropped from template
arguments
namespaces are dropped from template arguments
----------------------------------------------
Key: XALANJ-2381
URL: https://issues.apache.org/jira/browse/XALANJ-2381
Project: XalanJ2
Issue Type: Bug
Components: XSLTC
Affects Versions: 2.7
Reporter: Geoff Reedy
When the results of a call-template are passed as a parameter to another call-template which performs a copy-of on the parameter, the namespaces are lost.
The transform doesn't read it's input, so any well-formed xml will do.
-----8<---- bug.xslt -----8<-----
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template name="table">
<xsl:param name="headings" select="/.."/>
<fo:table-row>
<xsl:copy-of select="$headings"/>
</fo:table-row>
</xsl:template>
<xsl:template name="table-header-cell">
<xsl:param name="title"/>
<fo:table-cell>
<fo:block text-align="center" font-weight="bold"><xsl:value-of select="$title"/></fo:block>
</fo:table-cell>
</xsl:template>
<xsl:template match="/">
<xsl:call-template name="table">
<xsl:with-param name="headings">
<xsl:call-template name="table-header-cell">
<xsl:with-param name="title">This is text</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
------8<------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANJ-2381) namespaces are dropped from
template arguments
Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XALANJ-2381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489775 ]
Henry Zongaro commented on XALANJ-2381:
---------------------------------------
I think this is a duplicate of XALANJ-1725 (which is still open).
> namespaces are dropped from template arguments
> ----------------------------------------------
>
> Key: XALANJ-2381
> URL: https://issues.apache.org/jira/browse/XALANJ-2381
> Project: XalanJ2
> Issue Type: Bug
> Components: XSLTC
> Affects Versions: 2.7
> Reporter: Geoff Reedy
>
> When the results of a call-template are passed as a parameter to another call-template which performs a copy-of on the parameter, the namespaces are lost.
> The transform doesn't read it's input, so any well-formed xml will do.
> -----8<---- bug.xslt -----8<-----
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <xsl:template name="table">
> <xsl:param name="headings" select="/.."/>
> <fo:table-row>
> <xsl:copy-of select="$headings"/>
> </fo:table-row>
> </xsl:template>
> <xsl:template name="table-header-cell">
> <xsl:param name="title"/>
> <fo:table-cell>
> <fo:block text-align="center" font-weight="bold"><xsl:value-of select="$title"/></fo:block>
> </fo:table-cell>
> </xsl:template>
> <xsl:template match="/">
> <xsl:call-template name="table">
> <xsl:with-param name="headings">
> <xsl:call-template name="table-header-cell">
> <xsl:with-param name="title">This is text</xsl:with-param>
> </xsl:call-template>
> </xsl:with-param>
> </xsl:call-template>
> </xsl:template>
> </xsl:stylesheet>
> ------8<------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANJ-2381) namespaces are dropped from
template arguments
Posted by "Geoff Reedy (JIRA)" <xa...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XALANJ-2381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489747 ]
Geoff Reedy commented on XALANJ-2381:
-------------------------------------
Furthermore, this bug only seems to appear when call-templates are the only content of a with-param element. Adding an xsl:comment to the with-param is a workaround that doesn't change the meaning of the output document.
i.e. replace the template match="/" with the following and the output is as expected
---8<----
<xsl:template match="/">
<xsl:call-template name="table">
<xsl:with-param name="headings">
<xsl:comment>workaround xsltc bug</xsl:comment>
<xsl:call-template name="table-header-cell">
<xsl:with-param name="title">This is text</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
----8<----
> namespaces are dropped from template arguments
> ----------------------------------------------
>
> Key: XALANJ-2381
> URL: https://issues.apache.org/jira/browse/XALANJ-2381
> Project: XalanJ2
> Issue Type: Bug
> Components: XSLTC
> Affects Versions: 2.7
> Reporter: Geoff Reedy
>
> When the results of a call-template are passed as a parameter to another call-template which performs a copy-of on the parameter, the namespaces are lost.
> The transform doesn't read it's input, so any well-formed xml will do.
> -----8<---- bug.xslt -----8<-----
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <xsl:template name="table">
> <xsl:param name="headings" select="/.."/>
> <fo:table-row>
> <xsl:copy-of select="$headings"/>
> </fo:table-row>
> </xsl:template>
> <xsl:template name="table-header-cell">
> <xsl:param name="title"/>
> <fo:table-cell>
> <fo:block text-align="center" font-weight="bold"><xsl:value-of select="$title"/></fo:block>
> </fo:table-cell>
> </xsl:template>
> <xsl:template match="/">
> <xsl:call-template name="table">
> <xsl:with-param name="headings">
> <xsl:call-template name="table-header-cell">
> <xsl:with-param name="title">This is text</xsl:with-param>
> </xsl:call-template>
> </xsl:with-param>
> </xsl:call-template>
> </xsl:template>
> </xsl:stylesheet>
> ------8<------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org