[ https://issues.apache.org/jira/browse/XALANC-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven J. Hathaway resolved XALANC-701. --------------------------------------- Resolution: Fixed Assignee: Steven J. Hathaway Fixed - Submitted and tested > Fix on bad XALAN-675 fix > ------------------------ > > Key: XALANC-701 > URL: https://issues.apache.org/jira/browse/XALANC-701 > Project: XalanC > Issue Type: Bug > Components: XalanC > Affects Versions: CurrentCVS > Environment: Any > Reporter: Michael Kupchuk > Assignee: Steven J. Hathaway > Fix For: CurrentCVS > > Attachments: KeyTable.cpp.patch, KeyTable.hpp.patch, jira-701.patch > > > Due to fixes for XALANC-675 as of 02/06/2008 from dbertony, another bad > behaviour. > If a key is declared in xslt, but refers to unknown location, xalan reports > en error about unknown key when key is being used. > This part of code causes an exception: > ... > <xsl:key name="test-key" match="/NOTEXISTS" use="true()"/> > <xsl:value-of select="count(key('test-key', true()))"/> > <xsl:value-of select="count(key('test-key', false()))"/> > ... > Proposed fix is following: > KeyTable.hpp patch: > 154a155,156 > > > > KeyDeclarationVectorType m_allKeys; > KeyTable.cpp patch: > 68a69,70 > > m_allKeys=keyDeclarations; > > > 255a258,268 > > else > > { > > size_type nDeclarations=m_allKeys.size(); > > for (KeyDeclarationVectorType::size_type i = 0; i < nDeclarations; > > ++i) > > { > > if (*m_allKeys[i].getQName()==qname) > > { > > return &s_dummyList; > > } > > } > > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: xalan-dev-unsubscr...@xml.apache.org For additional commands, e-mail: xalan-dev-h...@xml.apache.org