Le lundi 23 avril 2012 18:47:10 Charlie Reinl a écrit : > Am Montag, den 23.04.2012, 00:39 +0200 schrieb Adrien Prokopowicz: > > Le dimanche 22 avril 2012 23:39:27 Charlie Reinl a écrit : > > > Salut Adrien, > > > > > > works better since rev #4657. > > > > > > but I get a signal 6 at the seconde Out = XSLT.Transform(Xml, Xsl) > > > > > > here I attached a demo where you can see it. > > > > > > This (the FromXML_old is the working version before you changes) is the > > > original sub I use. > > > > You got this signal because the resulting document of XSLT.Transform(Xml, > > Xsl) was empty, and hadn't any root element. > > > > I solved the problem in the rev #4659, but you should check if your > > resulting documents are all valid, in all cases, otherwise the parser may > > crash and/or return an empty document. > > Salut Adrien, > > the attached test.tar.gz is the same project newXML as yesterday I only > activated the FromXML_old branch. > And I packed also the 2 temporary files, to show you the output. > I used gambas 3.1 r4638 for. > > What I understood till now, whether the new gb.xml is stricter then the > old one and my 2 xlst are not well done xlst-files or your > XLST.Transform does not working right yet.
Yes, the new xslt.Transform is stricter that the old one, as the output document is parsed into memory via the XmlDocument parser, so it must be XML- valid. When I look at the temporary document, for me it is not an XML file, just because there isn't any root element. The W3C validator (validator.w3.org) and my parser (that shows errors in console since rev #4672) says the same thing as me. So, you'll have to add a root element (like <xml>) to your stylesheets, for the output document to be valid, and do not raise errors when parsing. Moreover, you should put your text datas into CDATAs section, if you don't want to be annoyed by the special characters (like < > etc...). ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user