The first part is done - which means: - renaming of all Java classes - reflect changes within Flowscripts - first run on updating all samples
open - Stylesheet for namespace change and change the namespaces
As nagoya seems to down at the moment you can find the stylesheet attached. 2 minor issues does it have:
- the old problem of namespace clean up. It copies all namespace declarations from input to output, so also the old woody one's. Instead of using <xsl:copy> I could have used <xsl:element>, but you need to define then all needed namespaces in the stylesheet additionally starting with i18n, maybe xhtml and so on. I prefer the post-processing (removing the superflouos woody namespaces) over the pre-processing of the stylesheet as adding additional namespace declarations is more error prone than removing the old ones.
- whitespace-only text nodes (other must not be there) between comment nodes are removed when they occur outside the root element. That's a problem of Xalan. Inside the root element those text nodes are copied to the output too. I saw this for form1-bind-bean.xml.
Joerg
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" xmlns:ft="http://apache.org/cocoon/forms/1.0#template" xmlns:wb="http://apache.org/cocoon/woody/binding/1.0" xmlns:wd="http://apache.org/cocoon/woody/definition/1.0" xmlns:wi="http://apache.org/cocoon/woody/instance/1.0" xmlns:wt="http://apache.org/cocoon/woody/template/1.0">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="wb:*">
<xsl:element name="fb:{local-name()}">
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>
<xsl:template match="wd:*">
<xsl:element name="fd:{local-name()}">
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>
<xsl:template match="wi:*">
<xsl:element name="fi:{local-name()}">
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>
<xsl:template match="wt:*">
<xsl:element name="ft:{local-name()}">
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
