I'm trying to write an XSP to a file using SourceWritingTransformer but the
latest DOMStreamer (v2.1) with setNormalizeNamespacesOn to true adds a
namespace to every element rather than to the xsp:page element (so that the
logicsheets don't work), when I setNormalizeNamespacesOn to false it outputs
no namespaces and my hack of adding namespaces in an xsl stylesheet doesn't
work:

<xsl:attribute name="esql:esqlDummyAttr"
namespace="http://apache.org/cocoon/SQL/v2"/>

I've also tried adding the namespaces in the xsp:page in the xsl stylesheet
but I'm not sure if SourceWritingTransformer is stripping them out or DOM
serializer is ignoring them:

<xsl:template match="page">
        <xsp:page xmlns:xsp="http://apache.org/xsp";
xmlns:esql="http://apache.org/cocoon/SQL/v2";...

Any ideas, namespaces in general seem to cause me a lot of headaches.


output:

<xsp:page xmlns:xsp="http://apache.org/xsp";>
        <content title="Students Home">
                <esql:connection xmlns:esql="http://apache.org/cocoon/SQL/v2";>
                        <esql:pool
xmlns:esql="http://apache.org/cocoon/SQL/v2";>dkitCareers</esql:pool>
...

sitemap:

<map:match pattern="createTemplate">
        <map:act type="request">
                <map:parameter name="parameters" value="true"/>
                <!--gets the semi pseudo code from the db-->
                <map:generate type="serverpages" src="util/executeQuery.xsp">
                        <map:parameter name="datasourceName" 
value="{global:datasourceName}"/>
                        <map:parameter name="xpath" value="/structure{path}"/>
                </map:generate>
                <!--converts semi pseudo code into XSP-->
                <map:transform src="util/createTemplate.xsl">
                        <map:parameter name="datasourceName" 
value="{global:datasourceName}"/>
                        <map:parameter name="path" value="{path}"/>
                </map:transform>
                <!--wraps the proper tags around the XSP for the write-source
transformer-->
                <map:transform src="util/createFile.xsl">
                        <map:parameter name="filename" value="views{path}.xsp"/>
                </map:transform>
                <!--writes it to a file-->
                <map:transform type="write-source"/>
                <map:serialize type="xml"/>
        </map:act>
</map:match>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to