Try the included patch (apply in the engine subdirectory).
Tom
------------- patch begins
Index: expr.cpp
===================================================================
RCS file: d:/cvs-master/ga/src/Sablot/engine/expr.cpp,v
retrieving revision 1.17
diff -a -u -r1.17 expr.cpp
--- expr.cpp 2000/08/19 22:46:55 1.17
+++ expr.cpp 2000/09/10 17:07:38
@@ -968,7 +968,9 @@
if (isRoot(baseV) || isNS(baseV) || isAttr(baseV))
break;
Daddy *theParent = toD(NZ(baseV -> parent));
- for (ord = v ? v -> ordinal + 1 : 0; ord < theParent ->
contents.number(); ord++)
+// changing to fix a bug
+// for (ord = v ? v -> ordinal + 1 : 0; ord < theParent ->
contents.number(); ord++)
+ for (ord = v ? v -> ordinal + 1 : baseV -> ordinal + 1; ord
< theParent -> contents.number(); ord++)
{
if (matchesWithoutPreds(w = theParent ->
contents[ord])) break;
else w = NULL;
@@ -980,7 +982,9 @@
if (isRoot(baseV) || isNS(baseV) || isAttr(baseV))
break;
Daddy *theParent = toD(NZ(baseV -> parent));
- for (ord = v ? v -> ordinal - 1 : theParent ->
contents.number() - 1; ord >= 0; ord--)
+// changing to fix a bug
+// for (ord = v ? v -> ordinal - 1 : theParent ->
contents.number() - 1; ord >= 0; ord--)
+ for (ord = v ? v -> ordinal - 1 : baseV -> ordinal - 1; ord
>= 0; ord--)
{
if (matchesWithoutPreds(w = theParent ->
contents[ord])) break;
else w = NULL;
------------- patch ends
Sebastian Rahtz wrote:
>
> Does Sabltotron implement these yet?
>
> Consider this XML
>
> <foo>
> <bar>1</bar>
> <bar>2</bar>
> <bar>3</bar>
> </foo>
>
> and this XSL
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>
> <xsl:output method="text"/>
>
> <xsl:template match="bar">
> <xsl:choose>
> <xsl:when test="not(preceding-sibling::bar)">
> <xsl:apply-templates/>
> </xsl:when>
> <xsl:when test="not(following-sibling::bar)">
> <xsl:text> and </xsl:text><xsl:apply-templates/>
> </xsl:when>
> <xsl:otherwise>
> <xsl:text>, </xsl:text><xsl:apply-templates/>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:template>
>
> </xsl:stylesheet>
>
> the output should be "1, 2 and 3", but Sablotron generates ", 1, 2, 3"
>
> bug, or just not implemented yet?
>
> Sebastian Rahtz