Thomas Bopp a �crit :
> 
> Hello!
> 
> I have the following xml code:
> <?xml version="1.0" encoding="iso-8859-1"?>
> ....
>     <value>bl&#246;des Teil</value>
> ....
> 
> and xsl:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> ...
>  <xsl:for-each select="value">
>       <td><xsl:value-of select="."/></td>
> 
> Which should generate "bl�des Teil". Unfortunately I always get
> "bl<C3><B6>des Teil"
> (this is the output of my shell, <C3><B6> are two characters in my
> browser).
> Is this a bug in sablotron, or did I do something wrong ? In the manual
> I read I can
> use values like "iso-...", etc if some library is installed.... My
> system is a sparc station
> with solaris 2.6. Is there a way to find out if my installation is
> correct ?
> ---Thomas

I am using german datas too:

here in input :
        <?xml version="1.0" encoding="iso-8859-1" standalone="no"?>

xsl stylesheet :
        <?xml version="1.0" encoding="iso-8859-1"?>

        <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

        <xsl:output method="xml" version="1.0" encoding="iso-8859-1"
indent="yes" />


The results are fine. The special caracters are well encoded for me.

Maybe you need to upgrade Sablotron.
I use the patch 0.44.1 and the patchs that you will find here (from
Kaiserovi):
To apply it, copy the following lines in a file *.patch.
put it in /Sablot/engine,
and then >patch <*.patch

If it succeds, try again your transformation.

_______________________________________________________________________


--- expr.cpp    Tue Nov 14 17:56:31 2000
+++ expr.cpp.new        Tue Nov 14 17:58:14 2000
@@ -2098,13 +2098,20 @@
                 E( e -> parse(t,from,leftmost - 1) );
                 int another = leftmost, 
                     lastone = leftmost;
-                t.getDelim(another);
+                // tom 24-10-00
+                // the following fails for "x and not(x
and x)"
+                // t.getDelim(another);
+                // changing it to:
+                another =
t.findTop(t.items[another]->tok, another+1);
                 while((another <= to) &&
(t.items[another]->tok != TOK_END))
                 {
                     args.append(e = new
Expression(ownerV,proc));
                     E( e -> parse(t, lastone + 1,
another - 1));
                     lastone = another;
-                    t.getDelim(another);
+
+                    // tom 14-11-00
+                    // t.getDelim(another);     failed
too, for "x and x and (x and x)"
+                    another =
t.findTop(t.items[another]->tok, another+1);
                 };
                 args.append(e = new
Expression(ownerV,proc));
                 E( e -> parse(t,lastone + 1, to) );
@@ -2692,13 +2699,14 @@
     case EXFF_SUBSTRING_AFTER:
         {
             Str s;
-            const Str& theSmaller = atoms[1] ->
tostringRef();
-            char *thestring;
+            const Str& 
+                theBigger = atoms[0] -> tostring(),
+                theSmaller = atoms[1] -> tostring();
             checkArgsCount(2);
             checkIsString2(0,1);
             int where = firstOccurence(
                 // changing tostringCharPtr() to
tostring():
-                thestring = atoms[0] -> tostring(),
+                theBigger,
                 theSmaller);
             if (where == -1)
                 s.empty();
@@ -2709,10 +2717,10 @@
                     if (where == 0)
                         s.empty();
                     else
-                        getBetween(s, thestring, 0,
where-1);
+                        getBetween(s, theBigger, 0,
where-1);
                 }
                 else
-                    getBetween(s, thestring, where +
theSmaller.length(), -1);
+                    getBetween(s, theBigger, where +
theSmaller.length(), -1);
             };
             retxpr.setAtom(s);
         }; break;
@@ -2799,11 +2807,14 @@
             checkIsString(2);
 
             DStr resulting;
+            Str baseStr = atoms[0] -> tostring(),
+                srcStr = atoms[1] -> tostring(),
+                destStr = atoms[2] -> tostring();
             char *q,
                 // changing tostringCharPtr() to
tostring():
-                *p = atoms[0] -> tostring(),
-                *src = atoms[1] -> tostring(),
-                *dest = atoms[2] -> tostring();
+                *p = baseStr,
+                *src = srcStr,
+                *dest = destStr;
             int ndx,
                 destlen = strlen(dest);
             while(*p)

Reply via email to