[ http://issues.apache.org/jira/browse/XALANJ-1784?page=all ]
Brian Minchau updated XALANJ-1784:
----------------------------------
Version: 2.6
(was: Latest Development Code)
> Attribute value template throws RuntimeException
> ------------------------------------------------
>
> Key: XALANJ-1784
> URL: http://issues.apache.org/jira/browse/XALANJ-1784
> Project: XalanJ2
> Type: Bug
> Components: XSLTC
> Versions: 2.6
> Environment: Operating System: Other
> Platform: Other
> Reporter: Brian Minchau
> Assignee: Xalan Developers Mailing List
> Attachments: apache.bugzilla.26698.patch.txt
>
> ERROR: 'Namespace for prefix 'foo' has not been declared.'
> is emitted but the namespace was declared on the xsl:template element.
> -----------------------------------------------------------
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:foo="bar"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:param name="par" select="'foo:abc'" />
> <xsl:template match="/">
> <out>
> <xsl:element name="{$par}">test</xsl:element>
> </out>
> </xsl:template>
> </xsl:stylesheet>
> -----------------------------------------------------------
> The problem is in org.apache.xalan.xsltc.runtime.BasisLibrary.
> The method startXslElement(...) recognizes that the mapping of prefix to URI
> is unknown, but it asks the DOM for help. I think the DOM represents either
> the
> input document or the stylesheet, but in either case the prefix might or
> might not be mapped at this point and it is the result-tree that is being
> built that would know the answer to whether the prefix, "foo" in the testcase
> maps to a URI. I'm attaching a patch soon where this method asks the
> SerializationHandler for help.
> Thanks to Joanne Tong for pointing out the bug and the testcase.
> - Brian Minchau
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]