Mat,

it was a bug. I'm sending a hand-crafted patch. If I forgot to include
some relevant change, the problem might persist; in that case, please
write.

Tom

--------------------------patch (apply inside 'engine')
Index: engine/output.cpp
===================================================================
RCS file: d:/cvs-master/ga/src/Sablot/engine/output.cpp,v
retrieving revision 1.1.1.2
diff -a -u -r1.1.1.2 output.cpp
--- output.cpp  2000/07/18 21:17:43     1.1.1.2
+++ output.cpp  2000/08/04 09:00:07
@@ -986,8 +1023,10 @@
 {
     switch(state)
     {
-    case STATE_OUTSIDE:
     case STATE_IN_MARKUP:
+        E( reportStartTag(NONEMPTY_ELEMENT) );
+        // no break
+    case STATE_OUTSIDE:
     case STATE_IN_ELEMENT:
         {
             E( reportCurrData() );
@@ -1019,6 +1058,8 @@
     switch(state)
     {
     case STATE_IN_MARKUP:
+        E( reportStartTag(NONEMPTY_ELEMENT) );
+        // no break
     case STATE_IN_ELEMENT:
     case STATE_OUTSIDE:
         {
------------------------------patch ends

Mat Jones wrote:
> 
> Hi
> 
> I've just started using Sablotron and have come accross what appears to
> be an error.  I need to include some javascript in the transformed
> output and have included the following code in my xslt transformation:
> 
> <xsl:template match="head">
>     <xsl:copy>
>         <xsl:apply-templates select="@*|node()"/>
> 
>         <script language="JavaScript">
>         <xsl:comment>
>            function some_function() {
>                some_code_here;
>            }
>         //</xsl:comment>
>         </script>
>     </xsl:copy>
> </xsl:template>
> 
> and find that the output from the transformation is re-ordered to:
> 
> <head>
> <!--
>            function some_function() {
>               some_code_here;
>            }
>         //--></script></head>
> <script language="JavaScript">
> 
> I've tried using the same transformation with other xslt engines and
> this doesn't happen.  Has anyone used Sablotron to output javascript in
> this way?  Does anyone know what the problem is?
> 
> Many thanks
> Mat Jones.
> [EMAIL PROTECTED]

Reply via email to