Thanks for the report, here's a patch. Apply in the engine directory.

Tom

-------------------patch begins
Index: expr.cpp
===================================================================
RCS file: d:/cvs-master/ga/src/Sablot/engine/expr.cpp,v
retrieving revision 1.18
retrieving revision 1.20
diff -a -u -r1.18 -r1.20
--- expr.cpp    2000/09/12 14:50:08     1.18
+++ expr.cpp    2000/10/16 20:26:59     1.20
@@ -2672,8 +2673,9 @@
             checkArgsCount(2);
             checkIsString2(0,1);
             retxpr.setAtom((Bool) !firstOccurence(
-                atoms[0] -> tostringCharPtr(),
-                atoms[1] -> tostringCharPtr()));
+                // changing tostringCharPtr() to tostring():
+                atoms[0] -> tostring(),
+                atoms[1] -> tostring()));
         }; break;
 
     case EXFF_CONTAINS:
@@ -2681,8 +2683,9 @@
             checkArgsCount(2);
             checkIsString2(0,1);
             retxpr.setAtom((Bool) (firstOccurence(
-                atoms[0] -> tostringCharPtr(),
-                atoms[1] -> tostringCharPtr()) != -1));
+                // changing tostringCharPtr() to tostring():
+                atoms[0] -> tostring(),
+                atoms[1] -> tostring()) != -1));
         }; break;
 
     case EXFF_SUBSTRING_BEFORE:
@@ -2694,7 +2697,8 @@
             checkArgsCount(2);
             checkIsString2(0,1);
             int where = firstOccurence(
-                thestring = atoms[0] -> tostringCharPtr(),
+                // changing tostringCharPtr() to tostring():
+                thestring = atoms[0] -> tostring(),
                 theSmaller);
             if (where == -1)
                 s.empty();
@@ -2796,9 +2800,10 @@
 
             DStr resulting;
             char *q,
-                *p = atoms[0] -> tostringCharPtr(),
-                *src = atoms[1] -> tostringCharPtr(),
-                *dest = atoms[2] -> tostringCharPtr();
+                // changing tostringCharPtr() to tostring():
+                *p = atoms[0] -> tostring(),
+                *src = atoms[1] -> tostring(),
+                *dest = atoms[2] -> tostring();
             int ndx,
                 destlen = strlen(dest);
             while(*p)
-------------------patch ends

Myoungki Kim wrote:
> 
> I send my test.xml file and test.xsl file.
> and, i use Sablot-0.44 version now..
> 
> how soon will it be fixed?
> 
> thanks
> 
> -- test.xml --
> <MML>
>         <META HTTP-EQUIV="Cache-Control" CONTENT="max-age=0"/>
>     <CARD NEWCONTEXT="true">
>                 <P mode="nowrap">Rullu
>                         <CHOICE>
>                                 <CE HREF="login.asp">Login</CE>
>                                 <CE HREF="not_main.asp">Main</CE>
>                         </CHOICE>
>                 </P>
>                 <DO TYPE="vnd.prev" LABEL="Join">
>                         <ACTION TASK="GO" HREF="join.asp?iptype=id&amp;uid=" 
>POSTMETHOD="GET"/>
>                 </DO>
>         </CARD>
> </MML>
> -- end text.xml --
> 
> -- test.xsl --
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
>         <xsl:template match="/">
>                 <HDML>
>                         <xsl:apply-templates/>
>                 </HDML>
>         </xsl:template>
> 
>         <xsl:template match="DISPLAY">
>                 <xsl:apply-templates/>
>         </xsl:template>
> 
>         <xsl:template match="NODISPLAY">
>                 <xsl:apply-templates/>
>         </xsl:template>
> 
>         <xsl:template match="CHOICE">
>                 <xsl:apply-templates/>
>         </xsl:template>
> 
>         <xsl:template match="CE">
>                 <xsl:choose>
>                         <xsl:when test="starts-with(@HREF,'#')">
>                                 <xsl:apply-templates/>
>                         </xsl:when>
>                         <xsl:otherwise>
>                                 <xsl:apply-templates/>
>                         </xsl:otherwise>
>                 </xsl:choose>
>         </xsl:template>
> 
> </xsl:stylesheet>
> -- end test.xsl --
> 
> -----Original Message-----
> From: Kaiserovi [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 09, 2000 7:41 AM
> To: Sablotron Mailing List
> Subject: Re: [Sab] starts-with function error
> 
> Yes, starts-with should be supported. We'll try to fix the problem if
> you kindly send us the full test data (stylesheet + XML) and indicate
> whether you're using version 0.44.
> 
> Thanks,
> Tom Kaiser (Ginger Alliance)
> 
> Myoungki Kim wrote:
> >
> > we make stylesheet with starts-with() function
> > but it couldnot error.
> >
> > our stylesheet .
> >         .....
> >         <xsl:when test="starts-with(@HREF,'#')">
> >
> >         </xsl:when>
> >
> > Does sablotron support starts-with() function?
> >
> > XSLTranslation: expr.cpp:1558: char * Expression::tostringCharPtr(): Assertion 
>`(functor == EXF_ATOM) && (type == EX_STRING)' failed.
> > Aborted


Reply via email to