google-code-export / gambas

Automatically exported from code.google.com/p/gambas
1 stars 0 forks source link

XSLT trasnform crash #283

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Hi every body...

 In Gambas 3 in ArchLinux...

 I try an tranform with XSLT, but Gambas crash in:

 oTransform = Xslt.Transform(oDocXML, oDocXSLT)

 the message is:

The programstopped unexpectedly
sending the signal# 11.

 My system is:

[System]
OperatingSystem=Linux
Kernel=3.4.4-3-ARCH
Architecture=i686
Memory=2059236 kB
DistributionVendor=arch
DistributionRelease=n/a
Desktop=Gnome
[Gambas 3]
Version=3.2.0
Path=/usr/bin/gbx3
[Libraries]
Qt4=libQtCore.so.4.8.2
GTK+=libgtk-x11-2.0.so.0.2400.10

 I try in Ubuntu 12.04 same results

 Atach little proyect test...

Any ideaswhere to look forthe error??

 Very thanks

Original issue reported on code.google.com by universolibremexico on 18 Jul 2012 at 10:04

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by adrien.p...@gmail.com on 18 Jul 2012 at 10:12

GoogleCodeExporter commented 9 years ago
I found where the problem was, but I will need some time to completly fix it.
Actually, the parser supports only documents that have a root element (and only 
this). So, if there isn't any root element (allowed by the W3C XML 
specification), it throws an error (since the revsision #4968, it doesn't 
crashes anymore) :

______

Public Sub Main()

  Dim oDocXML As New XmlDocument
  Dim oDocXSLT As New XmlDocument
  Dim oTransform As New XmlDocument

    oDocXML.Open("factura.xml")
    oDocXSLT.Open("cadena22.xslt")
    oTransform = Xslt.Transform(oDocXML, oDocXSLT)
    Print oTransform.ToString()

End

======

XSLT Warning : error when parsing output document : 
Parse error : No valid element root found !
 Line 0 , Column 0 : 
 (null)
<?xml version="1.0" encoding="UTF-8"?>
<xml>
</xml>

______

I already starded this work, but it mainly needs some changes in the Gambas API.

As a waorkaroud, you can change your XSLT file to have a root element in the 
output document.

Original comment by adrien.p...@gmail.com on 18 Jul 2012 at 11:33

GoogleCodeExporter commented 9 years ago
Sorry for my English ...

This error happened in the last update, previously working correctly ...

I do not understand the workaround you mention.

If I have to make a monetary contribution to be faster fix, I'm willing to do 
so.

Very thanks

Original comment by universolibremexico on 18 Jul 2012 at 11:59

GoogleCodeExporter commented 9 years ago
Hi,

This is fixed in the revision #4985, thanks.

Original comment by adrien.p...@gmail.com on 23 Jul 2012 at 9:29

GoogleCodeExporter commented 9 years ago

Original comment by adrien.p...@gmail.com on 23 Jul 2012 at 9:31