Hi,
I was tricked by this some time ago.

The problem is not, whether the namespace is defined (actually: bound to a 
prefix),
but what is used with the template match:

<xsl:template match="page">....</xsl:template>

probably will use "default" namespace (in your case 
"http://www.w3.org/1999/xhtml";) but not the "page" element from your namespace
bound to prefix "c".


Thus either

use "c:page" with the template match

or change your template to generate xhtml namespace "page" element.

Rainer

Magnus Haraldsen Amundsen schrieb:
> The XSLT has the c: namespace also,
> 
> <xsl:stylesheet
>         xmlns:c="http://xmlns.computas.com/cocoon";
>         xmlns:skos="http://www.w3.org/2004/02/skos/core#";
>         xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
>         xmlns:dct="http://purl.org/dc/terms/";
>         xmlns:sub="http://xmlns.computas.com/sublima#";
>         xmlns:foaf="http://xmlns.com/foaf/0.1/";
>         xmlns:sparql="http://www.w3.org/2005/sparql-results#";
>         xmlns="http://www.w3.org/1999/xhtml";
>         version="1.0">
> 
> I have multiple templates that follow the same syntax as the one for the Form 
> template, and they all work with my XSLT except for the Form template. 
> 
> Do I need the fd: ft: fi: namespaces defined in my XSLT?
> 
> 
> -----Original Message-----
> From: Rainer Pruy [mailto:[EMAIL PROTECTED] 
> Sent: 14. april 2008 13:18
> To: [email protected]
> Subject: Re: Problem with transformation of CForms using XSLT
> 
> Hi,
> looks like you got trapped in the twisty little maze of namespaces (;-)
> 
> I reckon, the XSLT (you mentioned, using the imports) is trying to match 
> "page" and not "c:page" (from namespace
> http://xmlns.computas.com/cocoon).
> 
> Rainer
> 
> Magnus Haraldsen Amundsen schrieb:
>> Hi,
>>
>>  
>>
>> I have a CForm with a definitions file and a template file. The template
>> file looks like this:
>>
>>  
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <c:page xmlns:ft="http://apache.org/cocoon/forms/1.0#template";
>>
>>         xmlns:fi="http://apache.org/cocoon/forms/1.0#instance";
>>
>>         xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";
>>
>>         xmlns="http://www.w3.org/1999/xhtml";
>>
>>         xmlns:c="http://xmlns.computas.com/cocoon";>
>>
>>  
>>
>>   <jx:import
>> uri="servlet:forms:/resource/internal/generation/jx-macros.xml"/>
>>
>>  
>>
>>   <c:content>
>>
>>     <c:resourceform>
>>
>>        <ft:form-template action="firstform" method="POST">
>>
>>          <fi:group>
>>
>>            <fi:styling layout="columns"/>
>>
>>            <fi:items>
>>
>>  
>>
>>             <ft:widget-label id="url"/>
>>
>>             <ft:widget id="url"/>
>>
>>  
>>
>>             <ft:widget-label id="title"/>
>>
>>             <ft:widget id="title"/>
>>
>>  
>>
>>           </fi:items>
>>
>>         </fi:group>
>>
>>         <input type="submit"/>
>>
>>       </ft:form-template>
>>
>>     </c:resourceform>
>>
>>   </c:content>
>>
>> </c:page>
>>
>>  
>>
>> This is transformed to XHTML using a XSLT that imports
>>
>>  
>>
>> <xsl:import
>> href="servlet:forms:/resource/internal/xsl/forms-page-styling.xsl"/>
>>
>>  <xsl:import
>> href="servlet:forms:/resource/internal/xsl/forms-field-styling.xsl"/>
>>
>>  
>>
>> And applies this to
>>
>>  
>>
>> <xsl:apply-templates select="c:page/c:content/c:resourceform"
>> mode="forms-page"/>
>>
>> <xsl:apply-templates select="c:page/c:content/c:resourceform"
>> mode="forms-field"/>
>>
>>  
>>
>> The problem is that the form doesn't output anything, it just writes out
>> the labels defined in the form definition file.
>>
>>  
>>
>> What can be the cause of this?
>>
>>  
>>
>> - Magnus
>>
>>  
>>
>>
>> IMPORTANT NOTICE: This message may contain confidential information. If
>> you have received this e-mail in error, do not use, copy or distribute
>> it. Do not open any attachments. Delete it immediately from your system
>> and notify the sender promptly by e-mail that you have done so. Thank you.
>>
> 

-- 
Rainer Pruy
Geschäftsführer

Acrys Consult GmbH & Co. KG
Untermainkai 29-30, D-60329 Frankfurt
Tel: +49-69-244506-0 - Fax: +49-69-244506-50
Web: http://www.acrys.com -  Email: [EMAIL PROTECTED]
Handelsregister: Frankfurt am Main, HRA 31151

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

Reply via email to