You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/03/07 18:50:07 UTC
[Bug 886] New - ElemExtensionCall.getAttribute with 3 arguments returns garbage when expression should evaluate to a blank string
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=886
*** shadow/886 Wed Mar 7 09:50:06 2001
--- shadow/886.tmp.8622 Wed Mar 7 09:50:07 2001
***************
*** 0 ****
--- 1,39 ----
+ +============================================================================+
+ | ElemExtensionCall.getAttribute with 3 arguments returns garbage when expre |
+ +----------------------------------------------------------------------------+
+ | Bug #: 886 Product: XalanJ2 |
+ | Status: NEW Version: 2.0.0 |
+ | Resolution: Platform: All |
+ | Severity: Normal OS/Version: Other |
+ | Priority: Medium Component: org.apache.xalan.templa |
+ +----------------------------------------------------------------------------+
+ | Assigned To: garyp@firstech.com |
+ | Reported By: garyp@firstech.com |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ This bug was initially reported by Alex Roytman <ro...@peacetech.com>.
+
+ This call
+ <url:param name="filter" value="{''}"/>
+ to xsl extension element causes ElemExtensionCall.getAttribute(String, Node,
+ TransformerImpl) to return garbage. The key is blank string value you could
+ also use
+ <url:param name="filter" value="{string(xpath-expression-which-returns-
+ nothing)}"/>
+
+ Here is the code for the param method:
+
+ public void param(XSLProcessorContext context, ElemExtensionCall extElem)
+ throws TransformerException
+ {
+ String n = extElem.getAttribute("name", context.getContextNode(),
+ context.getTransformer());
+ //FOLLOWING CALL RETURNS GARBAGE
+ String v = extElem.getAttribute("value", context.getContextNode(),
+ context.getTransformer());
+ if (n != null && n.length() > 0 && v != null && v.length() > 0) {
+ params.add(new String[]{ n, v });
+ }
+ }