Re: [xml] [libxslt] GPL-licensed file being distributed with MIT-licensed libxslt
On Fri, Oct 16, 2015 at 04:53:08PM +0800, Daniel Veillard wrote: > On Wed, Sep 16, 2015 at 11:11:53PM +0200, Nick Wellnhofer wrote: > > On 16/09/2015 22:51, Mike Dalessio wrote: > > >It appears as though the file > > > > > > libxslt-1.1.28/doc/tutorial2/libxslt_pipes.c > > > > > >is GPL licensed. > > > > > >This file is being distributed in the libxslt source tarball, which is at > > >odds > > >with libxslt's MIT license. > > > > The same goes for doc/tutorial/libxslt_tutorial.c which libxslt_pipes.c > > claims to be based on. Both files are based on the MIT-licensed xsltproc.c > > but there's nothing wrong with that. > > > > >Any thoughts on what, if anything, should be done about it? > > > > It's only part of the documentation, so I don't see a problem. > > Simplest is to find and ask the authors if they are fine relicencing > those, hopefully they see no problem and I will fix this, I tried to contact > them, let's see how it goes, So I reached to John Fleck and he's fine with this https://twitter.com/jfleck/status/655017833206714368 as well as Panos : Date: Fri, 16 Oct 2015 13:43:45 +0300 : From: Panos Louridas : To: veill...@redhat.com : Subject: Re: Licence of example in libxslt : : Hi Daniel, : : Yes, sure, no problem. What do you need from me to do this? : : Cheers, : : Panos. So I think we can remove the GPL header making the inherited MIT licence kick in: https://git.gnome.org/browse/libxslt/commit/?id=fd83a88ce3f68db599a3a2c8f018cbc66f9be19b so tell me how many hours of lawyer time were wasted on this issue ;-) ? Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
Re: [xml] Continuous integration for libxml2?
On Fri, Oct 16, 2015 at 02:06:30PM +0100, David Drysdale wrote: > Hi folks, Hi David, > Does libxml2 have a continuous integration system running over it somewhere? Not that I know of :) TBH the rate of changes is fairly slow, i.e. the code is mature (some will call it overripe even !) and while there is bugs, compared to the size of the system it's relatively small. > I've recently been exploring continuous integration systems and I used > libxml2 as a guinea pig for getting various tools working in > combination. Specifically, I've got a GitHub clone [1] of the repo > that links in with Travis [2]; once I added a few small local fixes > [3], I got the tests running on {gcc,clang} x {linux,osx} plus ASAN, > UBSAN and coverage [4] runs. The biggest issue I have is non-linux, I never use Windows or Macs and I have zero clue that a change there could break the build or else. There are mingw builds of libxml2 done within Red Hat but that's not real Windows tests. > Looking at recent bugs, it seems like a couple of other people (Hugh > Davenport [5], Hanno Boeck [6]) have also been looking at > sanitizer-related things. Yes, I also get Coverity Scan reports about it. > So I wondered if the master libxml2 repo already has a continuous > build pointed at it (the Gnome continuous build system [7], maybe?), No not that know of > and, if so, whether it might be a good idea to turn on various > analysis tools to help catch future problems. > > Thoughts? Sure, the rate of changes is fairly slow though: https://git.gnome.org/browse/libxml2/ But getting a report if something breaks on commit there would be appreciated as long as there is some logic to avoid pestering the list repeatedly with the same issue. That was a very painful experience on the very early versions of Coverity for example, Daniel > > Thanks, > David > > [1] https://github.com/daviddrysdale/libxml2 > [2] https://travis-ci.org/daviddrysdale/libxml2 > [3] https://github.com/daviddrysdale/libxml2/commits/test > [4] https://coveralls.io/github/daviddrysdale/libxml2 > [5] https://bugzilla.gnome.org/show_bug.cgi?id=756372 > [6] https://bugzilla.gnome.org/show_bug.cgi?id=752191 > [7] http://build.gnome.org/ > ___ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > https://mail.gnome.org/mailman/listinfo/xml -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
[xml] Continuous integration for libxml2?
Hi folks, Does libxml2 have a continuous integration system running over it somewhere? I've recently been exploring continuous integration systems and I used libxml2 as a guinea pig for getting various tools working in combination. Specifically, I've got a GitHub clone [1] of the repo that links in with Travis [2]; once I added a few small local fixes [3], I got the tests running on {gcc,clang} x {linux,osx} plus ASAN, UBSAN and coverage [4] runs. Looking at recent bugs, it seems like a couple of other people (Hugh Davenport [5], Hanno Boeck [6]) have also been looking at sanitizer-related things. So I wondered if the master libxml2 repo already has a continuous build pointed at it (the Gnome continuous build system [7], maybe?), and, if so, whether it might be a good idea to turn on various analysis tools to help catch future problems. Thoughts? Thanks, David [1] https://github.com/daviddrysdale/libxml2 [2] https://travis-ci.org/daviddrysdale/libxml2 [3] https://github.com/daviddrysdale/libxml2/commits/test [4] https://coveralls.io/github/daviddrysdale/libxml2 [5] https://bugzilla.gnome.org/show_bug.cgi?id=756372 [6] https://bugzilla.gnome.org/show_bug.cgi?id=752191 [7] http://build.gnome.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
Re: [xml] Compiling libxml2 against musl
On Tue, Dec 09, 2014 at 09:35:16PM +0100, Michael Heimpold wrote: > Hi, Hi Michael, (a bit late :-\) > I'm maintaining the libxml2 package on OpenWrt. Some weeks ago, there was a > bug filed > against the package, regarding a failure to compile libxml2 against musl c > library. > See https://github.com/openwrt/packages/issues/454 > > There is also a reference to your bug tracker: > https://bugzilla.gnome.org/show_bug.cgi?id=704908 right, closing it > And a link to a potential fix for this: > http://git.alpinelinux.org/cgit/aports/tree/main/libxml2/libxml2-pthread.patch > > Would be nice, if you could give some feedback, e.g. whether the proposed > patch > could be considered. if there was a __MUSL__ macro defined we could have used that but the http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F means that we deactivate for all non Glibc libs on Linux because of their stance. In any case the current git head seems to carry that patch, thanks, Daniel > Thanks, > Michael > > ___ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > https://mail.gnome.org/mailman/listinfo/xml -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
Re: [xml] v2.9.2 regression when using absolute paths without file: scheme in catalog?
On Fri, Mar 27, 2015 at 09:58:59AM +0100, Matthias Pigulla wrote: > Sorry for submitting a semi-finished message :( > > > What I wanted to say was - can anyone tell me whether this is a regression > in 2.9.2 or should I look for help in other places (which)? > > Thanks a lot > Matthias Hi Matthias, someone else reported catalog issues (but on Windows when switching to 2.9.2). I guess one would have to bissect to find the guilty commit, that would help understanding if it's really intended or a broken side effect, thanks Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
Re: [xml] indentation (again!)
Hi Bruce, On Sat, Jul 25, 2015 at 08:12:39AM -0400, Bruce Miller wrote: > Hi all; > I find unindented XML to be virtually impossible > to debug, but... :-) > Frankly, I'm impressed at how good the built-in heuristic > for formatting works (apparently the rule is: once it sees > mixed content, it turns off indentation below that level). > Of course, it isn't "correct" and is occasionally giving me > really messy problems. > > In principle, and perhaps naively, it seems the Correct rule > is rather simple, provided you have access to the DTD/Schema/whatever. The only correct rule is if there is a character on input it goes on output, the indentation is a trick but not what the standard suggests > Namely, if an element allows mixed content, do not add whitespace. > (and you CAN apply indentation on descendants that do NOT allow mixed > content). > > Is there some switch or method that I'm overlooking to > achieve this effect? no, indeed this would make sense ... assuming you have a schemas, etc... but when you serialize a document while the DTD *might* be available you can't really find out he RNG or XSD associated (or trust them, download them, etc) it open a can of worm TBH. > Is this likely to be relatively easy > to implement? (I've managed to avoid learning libxml2's C API, > as I use it via Perl's XML::LibXML.) > > I'd hate to have to give up indentation or write > my own serializer have you looked at xmllint --pretty 2 it does pretty printing but without adding (or removing) any significant character, it uses only the non-significant spaces from within markup which are discarded at parsing time. I know it's not what you asked for but might still be useful :-) Daniel > Thanks; > bruce > ___ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > https://mail.gnome.org/mailman/listinfo/xml -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
Re: [xml] xmlReadFile Fails Where xmlParseFile Succeeds
On Mon, Jul 27, 2015 at 02:38:23PM -0400, Paul Braman wrote: > The following bit of code fails > > xmlInitParser(); > xmlDocPtr maindoc = xmlReadFile("maindoc.xml", NULL, 0); > xmlDocPtr subdoc = xmlReadFile("subdoc.xml", NULL, 0); > xmlNodePtr content = xmlDocGetRootElement(subdoc); > xmlUnlinkNode(content); > xmlAddChild(xmlDocGetRootElement(maindoc), content); > xmlFreeDoc(subdoc); > xmlFreeDoc(maindoc); > xmlCleanupParser(); > > > with a crash upon calling xmlFreeDoc(maindoc) (problem freeing memory) > where this code succeeds just fine and dandy > > xmlInitParser(); > xmlDocPtr maindoc = xmlParseFile("maindoc.xml"); > xmlDocPtr subdoc = xmlParseFile("subdoc.xml"); > xmlNodePtr content = xmlDocGetRootElement(subdoc); > xmlUnlinkNode(content); > xmlAddChild(xmlDocGetRootElement(maindoc), content); > xmlFreeDoc(subdoc); > xmlFreeDoc(maindoc); > xmlCleanupParser(); > > > I understand I should use xmlReadFile instead of xmlParseFile. However, I > can't figure on what's different between the two that could be causing the > crash in the first block of code? > > Note, I've tried with multiple versions, even 2.9.2. > > Alternatively, how *should* I be structuring the code to do what I'm doing > here? (I know a call to > > xmlAddChild(xmlDocGetRootElement(maindoc), > xmlCopyNode(xmlDocGetRootElement(subdoc), 1)); > > > in place of the get/unlink/add sequence works but I'd like to understand > why the code above fails.) the problem is dictionaries. the Read* function boost the processing speed by using a dictionary for all the strings in markup etc. The dictionary is allocated to the document. when moving content you have pointers from that part of the subdoc to subdoc dictionary which get pruned to maindoc using a different dictionary. When trying to free the reference to the local document dictionary is lost, libxml2 then tries to free the strings from subdoc dictionary and that fails. 2 ways around that: Option 1: disable dictionaries when parsing if you do that kind of copy paste between documents (XML_PARSE_NODICT option see parser.h) Option 2: do the tweaking so that all the files get parsed with the same dictionary shared by all documents, more complex, libxslt does that for example, I don't have a simple document explaining it unfortunately. Daniel > ___ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > https://mail.gnome.org/mailman/listinfo/xml -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
Re: [xml] How do I go about adding missing entities to libxml2?
On Tue, Aug 04, 2015 at 05:59:11PM +1000, Sam Saffron wrote: > We have a bunch of missing entities (that flows through to other libs > like nokogiri ruby gem) > > for example ℵ > https://meta.discourse.org/t/certain-unicode-entities-are-being-escaped/19898 > > What do I need to do to get them into libxml2 ? you get them in a DTD referenced and loaded by your document. It's not an XML predefined entity so your document has to define what it means Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
Re: [xml] Schema validation when using an xml catalog of OGC schemas offline
On Tue, Oct 13, 2015 at 12:37:27PM +0100, Ricardo Filipe Soares Garcia da wrote: > Hi list Hi Ricardo, > I'm trying to prepare an XML catalog for working with OGC schemas[1], more > concretely the csw 2.0.2 schema[2]. > > This catalog's purpose is to use my locally downloaded schemas instead of > fetching them from OGC's repository every time I need to validate something. > > when I use xmllint without my catalog, the testing file[3] gets validated > OK, but the process takes a while, because the schemas have to be fetched > over the network: okay > # bash > export XML_DEBUG_CATALOG=1 > > xmllint --load-trace --noout --schema > /home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/csw/2.0.2/CSW-discovery.xsd > /home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/csw/2.0.2/examples/capabilities/Capabilities_tC22.xml > > > ... (lots of downloading of schemas happening here) > > Loaded > URL="/home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/csw/2.0.2/examples/capabilities/Capabilities_tC22.xml" > ID="(null)" > /home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/csw/2.0.2/examples/capabilities/Capabilities_tC22.xml > validates > > Now after downloading the whole opengis schemas, plus the W3C's xlink and > xml schemas into some common directory I have built a catalog file like > this: > > > > http://www.w3.org/"; > rewritePrefix="/home/geo2/dev/xmlschemas/w3c/"/> > http://schemas.opengis.net/"; > rewritePrefix="/home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/"/> > That should work though it might be better to be a bit more selective i.e. give more focused uriStartString values > When trying this out, xmllint fails saying that it cannot even compile the > schema: > > # bash > export XML_CATALOG_FILES=/home/geo2/dev/lixo/test_catalog.xml > > xmllint --load-trace --nonet --noout --schema > /home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/csw/2.0.2/CSW-discovery.xsd > /home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/csw/2.0.2/examples/capabilities/Capabilities_tC22.xml Don't disable net, if you're missing one reference it may fail, it's better to run with the network and see if it still tries to transfer something > ... (everything is fetched from my local repository, but eventually I start > getting errors like this) > > Resolve: sysID http://schemas.opengis.net/gml/3.1.1/smil/smil20.xsd > Resolve URI http://schemas.opengis.net/gml/3.1.1/smil/smil20.xsd > Using rewriting rule http://schemas.opengis.net/ > Loaded URL="http://schemas.opengis.net/gml/3.1.1/smil/smil20.xsd"; > ID="(null)" > Loaded > URL="/home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/gml/3.1.1/smil/smil20-language.xsd" > ID="(null)" > /home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/gml/3.1.1/smil/smil20-language.xsd:33: > element import: Schemas parser warning : Element '{ > http://www.w3.org/2001/XMLSchema}import': Skipping import of schema located > at > '/home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/gml/3.1.1/smil/smil20.xsd' > for the namespace 'http://www.w3.org/2001/SMIL20/', since this namespace > was already imported with the schema located at ' > http://schemas.opengis.net/gml/3.1.1/smil/smil20.xsd'. so the same schemas is referenced from 2 different location, that sounds bad, are they actually identical. If they embedded a copy to be able to tweak it that may result in the following errors if you don't load their version. > Loaded > URL="/home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/gml/3.1.1/base/temporalReferenceSystems.xsd" > ID="(null)" > Loaded > URL="/home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/gml/3.1.1/base/temporalTopology.xsd" > ID="(null)" > /home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/filter/1.1.0/filter.xsd:31: > element element: Schemas parser error : Element '{ > http://www.w3.org/2001/XMLSchema}element': A global element declaration '{ > http://www.opengis.net/ogc}_Id' does already exist. > /home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/filter/1.1.0/filter.xsd:34: > element element: Schemas parser error : Element '{ > http://www.w3.org/2001/XMLSchema}element': A global element declaration '{ > http://www.opengis.net/ogc}FeatureId' does already exist. > > ... (and it finally fails with) > > WXS schema > /home/geo2/dev/xmlschemas/SCHEMAS_OPENGIS_NET/csw/2.0.2/CSW-discovery.xsd > failed to compile > > So it seems that there is something missing from my xml catalog. It is > almost working (no files are being downloaded from the network). I've been > looking at libxml2's docs on catalogs[4], and also the OASIS spec[5], but I > haven't been able to make much more from it. > > Thanks for your help I'm afraid I don't know, more debug seems needed, try the suggested steps Daniel > [1] - http://schemas.opengis.net/ > [2] -http://schemas.opengis.net/csw/2.0.2/CSW-publication.xsd > [3] - > http://schemas.opengis.net/csw/2.0.2/examples/capabilities/Capabilities_tC22.xml > [4] - http://xmlsoft.org/catalog.html > [5] - > https://www.oasis-open.org/committees/entity/spec-2001-08-06.html#s.public > > -- > __
Re: [xml] HTMLtree.c escapes braces
On Thu, Sep 24, 2015 at 10:12:25PM +, Bruce Sinclair wrote: > Hi Daniel, > > We have had the issue that libxml2 encodes curly braces as character > references in HTML output because of the following code in HTMLtree.c: > >escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+"); >if (escaped != NULL) { > xmlBufferWriteQuotedString(buf->buffer, escaped); > xmlFree(escaped); > } else { > xmlBufferWriteQuotedString(buf->buffer, value); > } > > We don't think the curly braces, "{" and "}", should be changed to character > references. Doing so causes a problem with the use of braces in a Server > Response File (SRF) generated with libxml2. We change the first line of the > above code to: > >escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+{}"); > > to eliminate this issue. Could this be accepted as a fix to libxml2? > Hi Bruce, I don't understand, that code is in attribute content escaping, and for me "{" and "}" are not escaped: thinkpad2:~/XML -> cat ./tst.html thinkpad2:~/XML -> ./xmllint --html ./tst.html http://www.w3.org/TR/REC-html40/loose.dtd";> thinkpad2:~/XML -> Please provide a reproducer with xmllint so I understand what is going on, thanks, Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml
Re: [xml] [libxslt] GPL-licensed file being distributed with MIT-licensed libxslt
On Wed, Sep 16, 2015 at 11:11:53PM +0200, Nick Wellnhofer wrote: > On 16/09/2015 22:51, Mike Dalessio wrote: > >It appears as though the file > > > > libxslt-1.1.28/doc/tutorial2/libxslt_pipes.c > > > >is GPL licensed. > > > >This file is being distributed in the libxslt source tarball, which is at > >odds > >with libxslt's MIT license. > > The same goes for doc/tutorial/libxslt_tutorial.c which libxslt_pipes.c > claims to be based on. Both files are based on the MIT-licensed xsltproc.c > but there's nothing wrong with that. > > >Any thoughts on what, if anything, should be done about it? > > It's only part of the documentation, so I don't see a problem. Simplest is to find and ask the authors if they are fine relicencing those, hopefully they see no problem and I will fix this, I tried to contact them, let's see how it goes, Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml