Mat,
I did reply to your message, but it must have got lost somewhere. My
mailer was behaving a bit strange at the time. I hope the included patch
works. Patch inside the engine subdir using -p0.
Tom
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 sent this message about a week ago but didn't see it echoed on the
> list so here it is again, sorry if you have already received it. I
> have come accross what appears to be an error. I need to include
> 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 Fixed cost Internet access available @
> | Application Developer http://www.plus.net
> | PlusNet Technologies Ltd
> +---------------"PlusNet - The smarter way to Internet"----------------