On 07/04/2010 15:43, Tobias Neef wrote:
> Hello,
>
> I like to transform a XML file with various namespaces into the xdoc
> format. The XML file is in the xdoc/sap directory and the
> transformation is also in place. My problem now is, that nothing
> appears on my screen when I want to have a look at the transformed
> file.
Can you take a look at the intermediate format document by requesting
the *.xml version of your file. Do you see the expected XDoc?
This will tell you whether the problem is in your transformation from
the source or to the HTML.
Ross
>
> The header of the source file looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xml-fragment xmlns:rpl="urn:ReceiverDeterminationServiceVi"
> xmlns:rn0="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:rn1="urn:com.sap.aii.ib.server.api.types"
> xmlns:rn2="java:sap/standard"
> xmlns:rn3="urn:com.sap.aii.ibdir.server.api.types">
>
> Now I like to filter based on the type of the message.
>
> The relevant namespace for me is the rn3 namespace so I changed the
> default sitemap to look like this:
>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
> <map:components>
> <map:actions>
> <map:action logger="sitemap.action.sourcetype" name="sourcetype"
> src="org.apache.forrest.sourcetype.SourceTypeAction">
>
> ...
> <sourcetype name="ddp_si-v1.0">
> <!--<document-element
> namespace="urn:com.sap.aii.ibdir.server.api.types"/> -->
> <document-element local-name="rn3"/>
> </sourcetype>
> </map:action>
> </map:actions>
> <map:selectors default="parameter">
> <map:selector logger="sitemap.selector.parameter"
> name="parameter" src="org.apache.cocoon.selection.ParameterSelector"
> />
> </map:selectors>
> </map:components>
> <map:resources>
> <map:resource name="transform-to-document">
> <map:act type="sourcetype" src="{src}">
> <map:select type="parameter">
> <map:parameter name="parameter-selector-test" value="{sourcetype}" />
> <map:when test="ddp_si-v1.0">
> <map:generate src="{properties:content.xdocs}{../../1}.xml" />
> <map:transform
> src="{properties:resources.stylesheets}/rd2document.xsl" />
> <map:serialize type="xml-document"/>
> </map:when>
> ...
> </map:select>
> </map:act>
> </map:resource>
> </map:resources>
> <map:pipelines>
> <map:pipeline>
> <map:match pattern="old_site/**.html">
> <map:select type="exists">
> <map:when test="{properties:content}{0}">
> <map:read src="{properties:content}{0}" mime-type="text/html"/>
> </map:when>
> </map:select>
> </map:match>
> <map:match pattern="**.xml">
> <map:call resource="transform-to-document">
> <map:parameter name="src" value="{properties:content.xdocs}{1}.xml" />
> </map:call>
> </map:match>
> </map:pipeline>
> </map:pipelines>
> </map:sitemap>
>
> I also added a entry in the site.xml which appears in the menu but
> does not work as suspected (just a blank page is produced).
>
> <sap1 label="SAP Example 1" description="SAP Beispiele">
> <docs-sap1 label="SAP 1" href="sap/" tab="sap">
> <sap-pi-rd label="RD" href="si_ddpandmetadata_composite_a_a.html"
> description="Test of How To documents"/>
> </docs-sap1>
> </sap1>
>
> Hope someone can help.
>
> Regards,
> Tobias
|