Hello Eric [EMAIL PROTECTED] writes: > I looked into it a little bit and noticed that a new tag > <parents></parents> has been added to the .def.xml files. Not having > this tag seems to be the cause of the exception. Am I correct in this > and if so is there a solution to this (beyond adding this tag to every > resource in my older store)?
I wrote a small stylesheet and anttask for the conversion. Add the anttask to your build.xml and define the properties for store.new and store.old <!-- =================================================================== --> <!-- Convert filestore --> <!-- =================================================================== --> <target name="convert-filestore" > <xslt basedir="${store.old}" destdir="${store.new}" style="etc/filestoreupdate.xsl" extension=".xml" > <outputproperty name="indent" value="false"/> <include name="**/*.def.xml" /> </xslt> </target> <!-- =================================================================== --> You may have to modify the stylesheet. Add Rules for removing groups and actions, that do not longer exist. ===================== filestoreupdate.xsl ========================================= <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="@classname"> <xsl:attribute name="classname"> <xsl:choose> <xsl:when test="starts-with(.,'sliderole')"> <xsl:text>org.apache.slide.structure.SubjectNode</xsl:text> </xsl:when> <xsl:otherwise> <xsl:value-of select="." /> </xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:template> <xsl:template match="childs" > <children> <xsl:apply-templates select="child" /> </children> <parents> <xsl:if test="/data/objectnode/@uri != '/'"> <xsl:variable name="parentname"> <xsl:call-template name="afterLastSlash"> <xsl:with-param name="value" select="/data/objectnode/@uri" /> </xsl:call-template> </xsl:variable> <xsl:variable name="parentuuri"> <xsl:call-template name="beforeLastSlash"> <xsl:with-param name="rest" select="/data/objectnode/@uri" /> </xsl:call-template> </xsl:variable> <parent uuri="{$parentuuri}" name="{$parentname}" > </parent> </xsl:if> </parents> </xsl:template> <xsl:template match="child"> <xsl:variable name="name"> <xsl:call-template name="afterLastSlash"> <xsl:with-param name="value" select="@val" /> </xsl:call-template> </xsl:variable> <child name="{$name}" uuri="[EMAIL PROTECTED]" /> </xsl:template> <xsl:template name="afterLastSlash"> <xsl:param name="value" /> <xsl:variable name="rest" select="substring-after($value,'/')" /> <xsl:choose> <xsl:when test="$rest = ''"> <xsl:value-of select="$value" /> </xsl:when> <xsl:otherwise> <xsl:call-template name="afterLastSlash"> <xsl:with-param name="value" select="$rest" /> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="beforeLastSlash"> <xsl:param name="head" /> <xsl:param name="rest" /> <xsl:variable name="h" select="substring-before($rest,'/')" /> <xsl:variable name="r" select="substring-after($rest,'/')" /> <xsl:choose> <xsl:when test="$r = ''"> <xsl:value-of select="$head" /> </xsl:when> <xsl:when test="$h = ''"> <xsl:call-template name="beforeLastSlash"> <xsl:with-param name="rest" select="$r" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="beforeLastSlash"> <xsl:with-param name="head" select="concat($head,'/',$h)" /> <xsl:with-param name="rest" select="$r" /> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- ===================================================================== Default rules =======================================================================--> <xsl:template match="@*|*|text()|processing-instruction()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]