[med-svn] [r-cran-xml2] 01/06: New upstream version 1.1.1

Andreas Tille tille at debian.org
Fri Oct 13 07:51:47 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-xml2.

commit a0d3769c22669ce52ec993e86162d2cf00fb55d1
Author: Andreas Tille <tille at debian.org>
Date:   Fri Oct 13 09:20:07 2017 +0200

    New upstream version 1.1.1
---
 DESCRIPTION                       |   6 +--
 MD5                               |  13 ++---
 NEWS.md                           |   5 ++
 build/vignette.rds                | Bin 204 -> 206 bytes
 build/xml2.pdf                    | Bin 124812 -> 124812 bytes
 inst/doc/modification.html        |   4 +-
 src/xml2_output.cpp               |  27 ++++++++--
 vignettes/releases/xml2-1.1.0.Rmd | 103 ++++++++++++++++++++++++++++++++++++++
 8 files changed, 143 insertions(+), 15 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index c76d112..b0c58d9 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,5 +1,5 @@
 Package: xml2
-Version: 1.1.0
+Version: 1.1.1
 Title: Parse XML
 Description: Work with XML files using a simple, consistent interface. Built on
     top of the 'libxml2' C library.
@@ -27,7 +27,7 @@ Collate: 'RcppExports.R' 'as_list.R' 'xml_parse.R' 'as_xml_document.R'
         'xml_path.R' 'xml_schema.R' 'xml_serialize.R' 'xml_structure.R'
         'xml_text.R' 'xml_type.R' 'xml_url.R' 'xml_write.R' 'zzz.R'
 NeedsCompilation: yes
-Packaged: 2017-01-06 14:09:44 UTC; jhester
+Packaged: 2017-01-23 18:59:10 UTC; jhester
 Author: Hadley Wickham [aut],
   James Hester [aut, cre],
   Jeroen Ooms [aut],
@@ -35,4 +35,4 @@ Author: Hadley Wickham [aut],
   R Foundation [ctb] (Copy of R-project homepage cached as example)
 Maintainer: James Hester <james.hester at rstudio.com>
 Repository: CRAN
-Date/Publication: 2017-01-07 11:35:17
+Date/Publication: 2017-01-24 08:12:30
diff --git a/MD5 b/MD5
index 2a58abd..1490f81 100644
--- a/MD5
+++ b/MD5
@@ -1,6 +1,6 @@
-7b22b59c2866c5626458b24a56acb5eb *DESCRIPTION
+41fdead785e140bf32600942eb4f9e89 *DESCRIPTION
 4e1f4a66127068f7885b1ce9fefedb07 *NAMESPACE
-6c96527e57c088cf54c238e7e8317b12 *NEWS.md
+3a64bcfa61c6c9c13b18f5787b47f0d2 *NEWS.md
 dfc441f52ec9da64eae00904f1d74ead *R/RcppExports.R
 efeedfe02bf29b68260c262df64d882d *R/as_list.R
 2e24c60fdf22a2aebfcaab2c91b03452 *R/as_xml_document.R
@@ -24,14 +24,14 @@ f459598b4712e40ab2dca73beb1a00ef *R/xml_url.R
 f47d60217e13f3b1173fe65e2f8c3a2f *R/xml_write.R
 ba02edba719f666ae5dffeb962b215df *R/zzz.R
 0bda8bcf4ea5b3c5d6b8df5fc8096ccb *README.md
-f4514a9a6c2e08612dba25767717a65a *build/vignette.rds
-79379862415a7bafaae7d68aa19aab39 *build/xml2.pdf
+2eab7055df24173da8d9dceb42bfbf3d *build/vignette.rds
+fdcbc809dab72bb56f18c2855695e675 *build/xml2.pdf
 6071edd604dbeb75308cfbedc7790398 *cleanup
 3c3ad3c3abb2a5ef3752d70a3cb2c59f *configure
 d41d8cd98f00b204e9800998ecf8427e *configure.win
 9bb95c171ea8d0083ec59b77dc9650b5 *inst/doc/modification.R
 ae51ba62548cf18322d5b3ec999de7eb *inst/doc/modification.Rmd
-ee9691f93fdf294dcd2401db6a33b55b *inst/doc/modification.html
+810a859169b081353b1f5c7922b7dec4 *inst/doc/modification.html
 aa42c312677d8bd431c9f6055bacc5a2 *inst/extdata/order-doc.xml
 d815540b17662ddb93faa91d78ba0e5f *inst/extdata/order-schema.xml
 3d75cb054004ba36cf5bb4cac44eb27c *inst/extdata/r-project.html
@@ -71,7 +71,7 @@ be2c92c3d2a0fb1ded1b2bc32a737fa4 *src/connection.cpp
 3c3e387db63660a3d30f5b9f7304294d *src/xml2_init.cpp
 c764718bad3bc105164a88bc881f9061 *src/xml2_namespace.cpp
 970127334c4f8989442bd8ea2788af47 *src/xml2_node.cpp
-03a4d6a31342fe701dd20d3b3beb575d *src/xml2_output.cpp
+4715fe28716054f4128a2b20c4b1316e *src/xml2_output.cpp
 f842d5236e178aa9ca5928386ce24fee *src/xml2_schema.cpp
 1c198cf53390d534d28d3f1d3507dec2 *src/xml2_url.cpp
 c0dd2aad034c8822def5607011821eb7 *src/xml2_utils.h
@@ -113,3 +113,4 @@ f4bb4584a48ef582d2e0ab24064a0ab9 *tests/testthat/test-xml_serialize.R
 116ac76436068562dbf9754f5a7e4263 *tests/testthat/test-xml_text.R
 50ce4b1afd65325497a8b4dcce763e94 *tools/winlibs.R
 ae51ba62548cf18322d5b3ec999de7eb *vignettes/modification.Rmd
+3f18329bae7b6fc7c5dc1e51227a06ce *vignettes/releases/xml2-1.1.0.Rmd
diff --git a/NEWS.md b/NEWS.md
index f48f68f..1e6a1e5 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,8 @@
+# xml2 1.1.1
+
+* This is a small point release addressing installation issues found with older
+  libxml2 versions shipped with RedHat Linux 6 / CentOS 6 (#163, #164).
+
 # xml2 1.1.0
 
 ## New Features
diff --git a/build/vignette.rds b/build/vignette.rds
index 551e8ce..f8980b1 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/build/xml2.pdf b/build/xml2.pdf
index 856fbd8..1e6f486 100644
Binary files a/build/xml2.pdf and b/build/xml2.pdf differ
diff --git a/inst/doc/modification.html b/inst/doc/modification.html
index 9e80c86..2949086 100644
--- a/inst/doc/modification.html
+++ b/inst/doc/modification.html
@@ -12,7 +12,7 @@
 
 <meta name="author" content="Jim Hester" />
 
-<meta name="date" content="2017-01-06" />
+<meta name="date" content="2017-01-23" />
 
 <title>Node Modification</title>
 
@@ -70,7 +70,7 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
 
 <h1 class="title toc-ignore">Node Modification</h1>
 <h4 class="author"><em>Jim Hester</em></h4>
-<h4 class="date"><em>2017-01-06</em></h4>
+<h4 class="date"><em>2017-01-23</em></h4>
 
 
 
diff --git a/src/xml2_output.cpp b/src/xml2_output.cpp
index 73e76c5..ee0a3dc 100644
--- a/src/xml2_output.cpp
+++ b/src/xml2_output.cpp
@@ -32,6 +32,19 @@ Rconnection get_connection(SEXP con) {
 #include "xml2_types.h"
 #include "xml2_utils.h"
 
+
+  /* * *
+   *
+   * Author: Adam Spragg <adam at spra.gg>
+   * Date:   Wed Nov 3 15:33:40 2010 +0100
+   * https://github.com/GNOME/libxml2/commit/d2e62311cd15651e68f921167c7fcf05b19378f9
+   *
+   * Add xmlSaveOption XML_SAVE_WSNONSIG
+   */
+#if defined(LIBXML_VERSION) && (LIBXML_VERSION >= 20708)
+#define HAS_SAVE_WSNONSIG
+#endif
+
 // [[Rcpp::export]]
 Rcpp::IntegerVector xml_save_options() {
   Rcpp::IntegerVector out = Rcpp::IntegerVector::create(
@@ -41,8 +54,11 @@ Rcpp::IntegerVector xml_save_options() {
       Rcpp::_["no_xhtml"] = XML_SAVE_NO_XHTML,
       Rcpp::_["require_xhtml"] = XML_SAVE_XHTML,
       Rcpp::_["as_xml"] = XML_SAVE_AS_XML,
-      Rcpp::_["as_html"] = XML_SAVE_AS_HTML,
-      Rcpp::_["format_whitespace"] = XML_SAVE_WSNONSIG);
+      Rcpp::_["as_html"] = XML_SAVE_AS_HTML
+#ifdef HAS_SAVE_WSNONSIG
+      , Rcpp::_["format_whitespace"] = XML_SAVE_WSNONSIG
+#endif
+      );
   out.attr("descriptions") = Rcpp::CharacterVector::create(
       "Format output",
       "Drop the XML declaration",
@@ -50,8 +66,11 @@ Rcpp::IntegerVector xml_save_options() {
       "Disable XHTML1 rules",
       "Force XHTML1 rules",
       "Force XML output",
-      "Force HTML output",
-      "Format with non-significant whitespace");
+      "Force HTML output"
+#ifdef HAS_SAVE_WSNONSIG
+      , "Format with non-significant whitespace"
+#endif
+      );
   return out;
 }
 
diff --git a/vignettes/releases/xml2-1.1.0.Rmd b/vignettes/releases/xml2-1.1.0.Rmd
new file mode 100644
index 0000000..b75136b
--- /dev/null
+++ b/vignettes/releases/xml2-1.1.0.Rmd
@@ -0,0 +1,103 @@
+---
+title: xml2 1.1.0
+output:
+  html_document:
+    self_contained: false
+    highlight: NULL
+---
+
+```{r setup, include=FALSE}
+library(xml2)
+library(xslt)
+library(magrittr)
+
+knitr::opts_chunk$set(
+  collapse = TRUE,
+  comment = "#>"
+)
+```
+<meta charset="utf-8">
+
+Today we are pleased to release version 1.1.0 of xml2.  xml2 makes it easy to read, create, and modify XML with R. You can install it with:
+
+```{r, eval = FALSE}
+install.packages("xml2")
+```
+
+As well as fixing many bugs, this release:
+
+* Makes it easier to create an modify XML
+* Improves roundtrip support between XML and lists
+* Adds support for XML validation and XSLT transformations. 
+
+You can see a  full list of changes in the [release notes](https://github.com/hadley/xml2/releases/tag/v1.1.0). This is the first release maintained by [Jim Hester](https://github.com/jimhester).
+
+## Creating and modifying XML
+
+xml2 has been overhauled with a set of methods to make generating and modfying XML easier:
+
+*   `xml_new_root()` can be used to create a new document and root node 
+    simultaneously.
+
+    ```{r}
+    xml_new_root("x") %>%
+      xml_add_child("y") %>%
+      xml_root()
+    ```
+
+*   New `xml_set_text()`, `xml_set_name()`, `xml_set_attr()`, and 
+    `xml_set_attrs()` make it easy to modify nodes within a pipeline.
+  
+    ```{r}
+    x <- read_xml("<a>
+        <b />
+        <c><b/></c>
+      </a>")
+    x
+    
+    x %>% 
+      xml_find_all(".//b") %>% 
+      xml_set_name("banana") %>% 
+      xml_set_attr("oldname", "b")
+    x
+    ```
+
+* New `xml_add_parent()` makes it easy to insert a node as the parent of 
+  an existing node.
+
+* You can create more esoteric node types with `xml_comment()` (comments),
+  `xml_cdata()` (CDATA nodes), and `xml_dtd()` (DTDs).
+
+## Coercion to and from R Lists
+
+xml2 1.1.0 improves support for converting to and from R lists, thanks in part
+to work by [Peter Foley](https://github.com/peterfoley) and [Jenny
+Bryan](https://github.com/jennybc). In particular xml2 now supports preserving the root
+node name as well as saving all xml2 attributes as R attributes. These changes
+allows you to convert most XML documents to and from R lists with `as_list()`
+and `as_xml_document()` without loss of data.
+
+```{r}
+x <- read_xml("<fruits><apple color = 'red' /></fruits>")
+x
+as_list(x)
+as_xml_document(as_list(x))
+```
+
+## XML validation and xslt
+
+xml2 1.1.0 also adds support for XML validation, thanks to [Jeroen
+Ooms](https://github.com/jeroenooms).
+Simply read the document and schema files and call `xml_validate()`.
+
+```{r}
+doc <- read_xml(system.file("extdata/order-doc.xml", package = "xml2"))
+schema <- read_xml(system.file("extdata/order-schema.xml", package = "xml2"))
+xml_validate(doc, schema)
+```
+
+Jeroen also released the first xml2 extension package in conjunction with xml2
+1.1.0, [xslt](https://cran.r-project.org/package=xslt). xslt allows one to
+apply [XSLT (Extensible Stylesheet Language
+Transformations)](https://en.wikipedia.org/wiki/XSLT) to XML documents, which
+are great for transforming XML data into other formats such as HTML.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-cran-xml2.git



More information about the debian-med-commit mailing list