eblondel / ows4R

R Interface for OGC Web-Services (OWS)

Home Page:https://eblondel.github.io/ows4R/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Evaluate migration from XML to xml2

maelle opened this issue · comments

Just curious why {XML} is used rather than {xml2}? {XML} is no longer maintained.

That's not right: XML is maintained but by CRAN team and not anymore by the original author. Given the number of dependencies historically using XML, I doubt XML will be no longer maintained in time.

XML is used for various reasons, starting with the fact the packages I build (including ows4R and related such as geometa) needed XML at that time where xml2 was very limited. I had performed already some assessment in time whether it would be beneficial to move to xml2, and so far the answer is no. Writing complex XML (like with ISO/OGC schemas) is not an easy task in R and XML fulfills all needs. In addition, assuming that we could move to xml2, refactoring would have a significant cost ensuring everything is working as it is currently with {XML}. The question to move to xml2 might come back on the table in case CRAN team decides to kill {XML} package some day, which I doubt seriously. If they decide not to maintain it anymore and make it an orphaned, I will probably candidate to take over its maintenance.

PS: I will open a gitter or a github discussion soon for ows4R, to move all discussions aspects there, so we keep tickets for bug/enhancements :-)

Thank you!!

@eblondel for info, you might find that thread interesting: RConsortium/r-repositories-wg#26

Thanks @maelle for this
at that time when I had look at xml2, I didn't find a way to write XML files with it. Packages such as ows4R, geometa and others I've been writing rely on XML decoding and encoding. Probably xml2 is capable to do writing of xml, and hopefulle XML validation vs. XML schemas which is a key feature done with XML package. From my side, I'm definitely in favor of a migration to xml2, but this requires assessment to make sure all XML capabilities are covered, without any side effect or loss of functionality. Referring to geometa, which metadata model is extensively used in ows4R (through CSW management of metadata), it's the most complex XML handling I did in packages.

Probably I will start doing this XML-->xml2 assessment, and transition test with other simpler models like those managed in atom4R, geosapi or geonapi.

Btw, i reopen this issue, let's keep it open, until I start tackling it.

Yes xml2 can write files. Regarding schema validation, I've never done that but I see https://xml2.r-lib.org/reference/xml_validate.html

Thank you and good luck with the assessment/transition!

The migration from XML to xml2 is ongoing as cross-cutting activity between several packages. For now it has been applied on rather simple XML implementations (Done with geosapi in its latest release) and is analyzed in others with increasing XML schemas complexity, starting with [atom4R)(https://github.com/eblondel/atom4R). Progressively I hope to be able to tackle geometa and ows4R

Thank you for this work!