cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Ottaviano <coc...@lst.tfo.upm.es>
Subject Re: XSLT table formatting problem: I'm lost
Date Thu, 07 Sep 2006 16:29:10 GMT
*I use the transformer of the http://www.planetcocoon.com/node/2425  but 
without namespaces as follow:*

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
  <xsl:template match="*" priority="-1">
    <xsl:choose>
      <xsl:when test="namespace-uri()=''">
        <!-- assume if namespace empty, namespace = xhtml -->
        <xsl:element name="{name()}">
          <xsl:apply-templates select="@*|node()"/>
        </xsl:element>
      </xsl:when>
      <xsl:otherwise>
        <xsl:element name="{local-name()}">
          <xsl:apply-templates select="@*|node()"/>
        </xsl:element>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
 
  <xsl:template match="@*|comment()">
    <xsl:copy/>
  </xsl:template>
 
</xsl:stylesheet>

Ant it still no works...... :(


thanks very much
manuel ottaviano.
*************************


Jeroen Reijn escribió:
> Hi Manuel,
>
> I hope I can help you out.
>
> Manuel Ottaviano wrote:
>> I've delete all the XML namespace using a trasformer suggested in
>>  that removes all namespaces.
>> So, inside the pipeline there are decleare 2 process:
>
> Did you notice that this nonamespace xsl does set a default namespace?
> (xmlns="http://www.w3.org/1999/xhtml").
>
>>
>> **Test proces:*
>>
>>  <map:match pattern="prova">
>>       <map:generate src="prova.xml"/>
>> <map:transform src="nonamespace.xsl"/>
>>   <map:transform src="prova1.xsl"/>        <map:serialize type="xml"/>
>>       </map:match>     
>> *Dynamic process *
>>  
>>
>> <map:match pattern="result">
>>       <map:generate type="jx"  src="flow2ws.xml"/>
>>        <map:transform type="i18n">
>>                 <map:parameter name="default-catalogue-id" 
>> value="messages"  location="translations"/>
>>             <map:parameter name="locale" value="{../locale}"/>
>>           </map:transform>
>>     <map:transform src="nonamespace.xsl"/>          <map:transform 
>> src="tagger.xsl"/>
>>
>>     <map:transform src="prova1.xsl"/>      
>>         <map:serialize type="xml"/>
>>    </map:match> *I use jx XML file to merge with a Web Service XML 
>> response and it works  fine , also with i18n capabilities. I use the 
>> 'tagger' styleshet to convert html tag symbols in "<" and ">"  .  The 
>> nonamespace.xsl is the trasformer that removes the namespaces .*
>> *The XML result for the 2 process, [by  removing the prova1.xsl 
>> stylesheet] is the same:
>>
>
> Did you try to do a copy-of the current node (the node that starts the 
> for-each) and see what the XML looks like?
>
> Regards,
>
> Reijn
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>


Mime
View raw message