Use this sample exportOptions config to export a library and change its title, so that the output xml can be reimported.
Place the file in the gn4\bin on the server.
Edit the file with notepad, and replace the variable defining the new title with the name of the destination title.(“Pub 01” in my case):
<eop:XmlExportOptions
xmlns:eop="http://www.teradp.com/schemas/GN4/1/XmlExportOptions.xsd"
DataMaxSize="-1"
AccessStrict="false"
NavOptions="Default"
MimeType="application/xml">
<eop:Pars>
<settings xmlns="">
<add key="newTitle" value="Pub 01"/>
</settings>
</eop:Pars>
<eop:Xslt>
<xsl:stylesheet version="1.0" exclude-result-prefixes="xsl ms lc oc fn nav gn4" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:lc="http://www.teradp.com/schemas/GN4/1/LoginContext.xsd" xmlns:oc="http://www.teradp.com/schemas/GN4/1/OperationContext.xsd" xmlns:fn="http://www.teradp.com/schemas/GN4/1/Xslt" xmlns:nav="http://www.teradp.com/schemas/GN4/1/ObjNav.xsd" xmlns:gn4="urn:schemas-teradp-com:gn4tera">
<xsl:param name="context"/>
<xsl:param name="pars"/>
<xsl:template match="/">
<gn4:objects>
<xsl:apply-templates/>
</gn4:objects>
</xsl:template>
<xsl:template match="gn4:objects">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="gn4:lib">
<gn4:lib id="{@id}">
<gn4:titleRef>
<keyVal>
<xsl:value-of select="$pars/*/add[@key='newTitle']/@value"/>
</keyVal>
</gn4:titleRef>
</gn4:lib>
</xsl:template>
</xsl:stylesheet>
</eop:Xslt>
</eop:XmlExportOptions>
Save the file.
From command line console, opened as administrator, run the
srv4 export -conditions "gn4:lib[@name='AN News Full Pages']" -opt expOptLib.xml -out lib.xml
where “AN News Full Pages” is the name of my library.
Then import the file using:
srv4 import lib.xml
The library will disappear from the original title and it will be in the new one.