[Gambas-user] Issue 283 in gambas: XSLT trasnform crash
gambas at ...2524...
gambas at ...2524...
Thu Jul 19 01:33:07 CEST 2012
Updates:
Status: Started
Comment #2 on issue 283 by adrien.p... at ...626...: XSLT trasnform crash
http://code.google.com/p/gambas/issues/detail?id=283
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.
More information about the User
mailing list