[netcf-devel] [PATCH 2/3] Transforms for ipv6-addressing

Daniel Veillard veillard at redhat.com
Fri Sep 25 15:56:03 UTC 2009


On Thu, Sep 24, 2009 at 04:32:22PM -0700, David Lutterkort wrote:
>   * data/xml/initscripts-get.xsl: produce IPv6 entries in ifcfg- files
>   * data/xml/initscripts-put.xsl: read IPv6 entries in ifcfg files and
>     generate XML for them. Uses libexslt.
>   * src/drv_initscripts.c: register the strings module from libexslt
>   * configure.ac: use libexslt
> ---
>  configure.ac                 |    3 +-
>  data/xml/initscripts-get.xsl |   44 ++++++++++++++++++++++++++++++++++++++++++
>  data/xml/initscripts-put.xsl |   44 +++++++++++++++++++++++++++++++++++++++++-
>  src/drv_initscripts.c        |    3 ++
>  4 files changed, 92 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 8775940..acfacbf 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -30,10 +30,11 @@ PKG_PROG_PKG_CONFIG
>  PKG_CHECK_MODULES([LIBAUGEAS], [augeas >= 0.5.0])
>  PKG_CHECK_MODULES([LIBXML], [libxml-2.0])
>  PKG_CHECK_MODULES([LIBXSLT], [libxslt])
> +PKG_CHECK_MODULES([LIBEXSLT], [libexslt])
>  
>  NETCF_CHECK_READLINE
>  
> -NETCF_LIBDEPS=$(echo $LIBAUGEAS_LIBS $LIBXSLT_LIBS $LIBXML_LIBS)
> +NETCF_LIBDEPS=$(echo $LIBAUGEAS_LIBS $LIBEXSLT_LIBS $LIBXSLT_LIBS $LIBXML_LIBS)

  Hum libexslt is not the most correct part of the stack ...

[...]
> -                extension-element-prefixes="bond ipcalc"
> +                xmlns:str="http://exslt.org/strings"
> +                extension-element-prefixes="bond ipcalc str"
[...]
> +        <xsl:if test="node[@label = 'IPV6ADDR_SECONDARIES']">
> +          <xsl:for-each select="str:split(node[@label = 'IPV6ADDR_SECONDARIES']/@value)">

 okay str:split should be safe :-)
I didn't noticed anything nasty !


Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


More information about the netcf-devel mailing list