dbertoni    01/04/10 15:53:50

  Modified:    c/src/XSLT ElemVariable.cpp
  Log:
  xsl:variable without select and empty now creates an empty string, not a 
result tree fragment.
  
  Revision  Changes    Path
  1.16      +9 -1      xml-xalan/c/src/XSLT/ElemVariable.cpp
  
  Index: ElemVariable.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemVariable.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ElemVariable.cpp  2001/03/09 16:19:56     1.15
  +++ ElemVariable.cpp  2001/04/10 22:53:49     1.16
  @@ -66,6 +66,7 @@
   
   
   
  +#include <XPath/XObjectFactory.hpp>
   #include <XPath/ResultTreeFrag.hpp>
   #include <XPath/XPath.hpp>
   #include <XPath/XResultTreeFrag.hpp>
  @@ -184,7 +185,14 @@
   {
        if(m_selectPattern == 0)
        {
  -             return executionContext.createXResultTreeFrag(*this, 
sourceNode);
  +             if (getFirstChild() == 0)
  +             {
  +                     return 
executionContext.getXObjectFactory().createString(XalanDOMString());
  +             }
  +             else
  +             {
  +                     return executionContext.createXResultTreeFrag(*this, 
sourceNode);
  +             }
        }
        else
        {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to