You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Enke, Michael" <mi...@wincor-nixdorf.com> on 2002/09/03 14:09:43 UTC

default xsl transformer?

Hi,
I'm wondering what is the xsl-transformer used by current sitemap.xmap?
I found there:

    <!-- NOTE: This used to be the default XSLT processor. The default now is XSLTC -->
    <map:transformer logger="sitemap.transformer.xslt" name="xalan" pool-grow="2" pool-max="32" pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer">
      <use-request-parameters>false</use-request-parameters>
      <use-browser-capabilities-db>false</use-browser-capabilities-db>
      <use-deli>false</use-deli>
    </map:transformer>
 
    <!--
        NOTE: XSLTC is now the default processor. If you use Xalan extensions,
        use the "xalan" transformer.
     -->
    <map:transformer logger="sitemap.transformer.xsltc" name="xslt" pool-grow="2" pool-max="32" pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer">
      <use-request-parameters>false</use-request-parameters>
      <use-browser-capabilities-db>false</use-browser-capabilities-db>
      <use-deli>false</use-deli>
      <!-- transformer-factory>org.apache.xalan.xsltc.trax.TransformerFactoryImpl</transformer-factory -->
    </map:transformer>

Both use the same src="org.apache.cocoon.transformation.TraxTransformer",
they are different only in logger and name.

Q.1) I guess it will be right to removve the comment for <transformer-factory/>?
Q.2) From where TraxTransformer knows which one to use if no <transformer-factory/> is given?

Regards,
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: default xsl transformer?

Posted by Vadim Gritsenko <va...@verizon.net>.
Enke, Michael wrote:

>Vadim Gritsenko wrote:
>  
>
>>>>Try Saxon. I always try Saxon before blaming Xalan.
>>>>        
>>>>
>>>Where and how to configure? Do I need an additional jar?
>>>
>>>      
>>>
>>Remove xalan-2.3.1.jar from the WEB-INF/lib, drop saxon-6.5.2.jar
>>instead, restart.
>>    
>>
>
>Hi Vadim,
>thank you for your help.
>I only have one problem left: I get this exception:
>
>The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies that org.apache.cocoon.ProcessingException says:
>
> org.xml.sax.SAXException: Invalid processing instruction name (saxon:warning)
>
> More precisely:
>
> org.apache.cocoon.ProcessingException: Failed to execute pipeline.: javax.xml.transform.TransformerException: org.xml.sax.SAXException:
> Invalid processing instruction name (saxon:warning)
> at com.icl.saxon.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:104)
>              at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
>

This is not a stacktrace of

javax.xml.transform.TransformerException. But in any case, I have not seen such exception before.


Vadim




>              at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:622)
>              at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
>              ...
>
>Do you know how to handle this?
>
>Thanky you,
>Michael
>




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: default xsl transformer?

Posted by "Enke, Michael" <mi...@wincor-nixdorf.com>.
Vadim Gritsenko wrote:
> >>Try Saxon. I always try Saxon before blaming Xalan.
> >
> >Where and how to configure? Do I need an additional jar?
> >
> 
> Remove xalan-2.3.1.jar from the WEB-INF/lib, drop saxon-6.5.2.jar
> instead, restart.

Hi Vadim,
thank you for your help.
I only have one problem left: I get this exception:

The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies that org.apache.cocoon.ProcessingException says:

 org.xml.sax.SAXException: Invalid processing instruction name (saxon:warning)

 More precisely:

 org.apache.cocoon.ProcessingException: Failed to execute pipeline.: javax.xml.transform.TransformerException: org.xml.sax.SAXException:
 Invalid processing instruction name (saxon:warning)
 at com.icl.saxon.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:104)
              at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
              at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:622)
              at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
              ...

Do you know how to handle this?

Thanky you,
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: default xsl transformer?

Posted by Vadim Gritsenko <va...@verizon.net>.
Enke, Michael wrote:

>>>Original exception : java.lang.NullPointerException
>>>at java.lang.System.arraycopy(Native Method)
>>>at org.apache.xml.utils.FastStringBuffer.append(FastStringBuffer.java:642)
>>>at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.characters(SAX2DTM.java:1825)
>>>at org.apache.xml.dtm.ref.IncrementalSAXSource_Filter.characters(IncrementalSAXSource_Filter.java:257)
>>>at org.apache.xalan.transformer.TransformerHandlerImpl.characters(TransformerHandlerImpl.java:572)
>>>at org.apache.cocoon.xml.AbstractXMLPipe.characters(AbstractXMLPipe.java:159)
>>>at org.apache.cocoon.xml.AbstractXMLPipe.characters(AbstractXMLPipe.java:159)
>>>at org.apache.cocoon.transformation.I18nTransformer.characters(I18nTransformer.java:905)
>>>...
>>>
>>>But in I18nTransformer the method call to characters(char[], int, int) is definitively correct.
>>>So I thought: get the newest xalan-2.4.D1.jar but the Exception is exactly the same, even in the
>>>same Sourceline: 572. Than I thought: that cann't be and tried to remove xalan.jar and xsltc.jar
>>>but the result is the same!?
>>>
>>>      
>>>
>>Try Saxon. I always try Saxon before blaming Xalan.
>>    
>>
>
>Where and how to configure? Do I need an additional jar?
>

Remove xalan-2.3.1.jar from the WEB-INF/lib, drop saxon-6.5.2.jar 
instead, restart.

Vadim


>Thanks,
>Michael
>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: default xsl transformer?

Posted by "Enke, Michael" <mi...@wincor-nixdorf.com>.
> >Original exception : java.lang.NullPointerException
> > at java.lang.System.arraycopy(Native Method)
> > at org.apache.xml.utils.FastStringBuffer.append(FastStringBuffer.java:642)
> > at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.characters(SAX2DTM.java:1825)
> > at org.apache.xml.dtm.ref.IncrementalSAXSource_Filter.characters(IncrementalSAXSource_Filter.java:257)
> > at org.apache.xalan.transformer.TransformerHandlerImpl.characters(TransformerHandlerImpl.java:572)
> > at org.apache.cocoon.xml.AbstractXMLPipe.characters(AbstractXMLPipe.java:159)
> > at org.apache.cocoon.xml.AbstractXMLPipe.characters(AbstractXMLPipe.java:159)
> > at org.apache.cocoon.transformation.I18nTransformer.characters(I18nTransformer.java:905)
> > ...
> >
> >But in I18nTransformer the method call to characters(char[], int, int) is definitively correct.
> >So I thought: get the newest xalan-2.4.D1.jar but the Exception is exactly the same, even in the
> >same Sourceline: 572. Than I thought: that cann't be and tried to remove xalan.jar and xsltc.jar
> >but the result is the same!?
> >
> 
> Try Saxon. I always try Saxon before blaming Xalan.

Where and how to configure? Do I need an additional jar?

Thanks,
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: default xsl transformer?

Posted by Vadim Gritsenko <va...@verizon.net>.
Enke, Michael wrote:

>Vadim Gritsenko wrote:
>  
>
>>Enke, Michael wrote:
>>
>>    
>>
>>>Vadim Gritsenko wrote:
>>>
>>>
>>>      
>>>
>>>>>Q.2) From where TraxTransformer knows which one to use if no <transformer-factory/> is given?
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>From configuration only.
>>>>
>>>>
>>>>        
>>>>
>>>>>From cocoon.roles?
>>>
>>>I have the problem that if I use <xsl:strip-space/> in xsl transformation
>>>I get a NullpointerException after some hundred elements.
>>>
>>>      
>>>
>>This is not helpful. Where it happens?
>>    
>>
>
>
>Original exception : java.lang.NullPointerException
> at java.lang.System.arraycopy(Native Method)
> at org.apache.xml.utils.FastStringBuffer.append(FastStringBuffer.java:642)
> at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.characters(SAX2DTM.java:1825)
> at org.apache.xml.dtm.ref.IncrementalSAXSource_Filter.characters(IncrementalSAXSource_Filter.java:257)
> at org.apache.xalan.transformer.TransformerHandlerImpl.characters(TransformerHandlerImpl.java:572)
> at org.apache.cocoon.xml.AbstractXMLPipe.characters(AbstractXMLPipe.java:159)
> at org.apache.cocoon.xml.AbstractXMLPipe.characters(AbstractXMLPipe.java:159)
> at org.apache.cocoon.transformation.I18nTransformer.characters(I18nTransformer.java:905)
> ...
>
>But in I18nTransformer the method call to characters(char[], int, int) is definitively correct.
>So I thought: get the newest xalan-2.4.D1.jar but the Exception is exactly the same, even in the
>same Sourceline: 572. Than I thought: that cann't be and tried to remove xalan.jar and xsltc.jar
>but the result is the same!?
>

Try Saxon. I always try Saxon before blaming Xalan.

Vadim


>This happens only if I have <strip-space elements="..."/> in the stylesheet.
>
>
>Michael
>  
>




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: default xsl transformer?

Posted by "Enke, Michael" <mi...@wincor-nixdorf.com>.
Vadim Gritsenko wrote:
> 
> Enke, Michael wrote:
> 
> >Vadim Gritsenko wrote:
> >
> >
> >>>Q.2) From where TraxTransformer knows which one to use if no <transformer-factory/> is given?
> >>>
> >>>
> >>>
> >> From configuration only.
> >>
> >>
> >
> >>From cocoon.roles?
> >
> >I have the problem that if I use <xsl:strip-space/> in xsl transformation
> >I get a NullpointerException after some hundred elements.
> >
> 
> This is not helpful. Where it happens?


Original exception : java.lang.NullPointerException
 at java.lang.System.arraycopy(Native Method)
 at org.apache.xml.utils.FastStringBuffer.append(FastStringBuffer.java:642)
 at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.characters(SAX2DTM.java:1825)
 at org.apache.xml.dtm.ref.IncrementalSAXSource_Filter.characters(IncrementalSAXSource_Filter.java:257)
 at org.apache.xalan.transformer.TransformerHandlerImpl.characters(TransformerHandlerImpl.java:572)
 at org.apache.cocoon.xml.AbstractXMLPipe.characters(AbstractXMLPipe.java:159)
 at org.apache.cocoon.xml.AbstractXMLPipe.characters(AbstractXMLPipe.java:159)
 at org.apache.cocoon.transformation.I18nTransformer.characters(I18nTransformer.java:905)
 ...

But in I18nTransformer the method call to characters(char[], int, int) is definitively correct.
So I thought: get the newest xalan-2.4.D1.jar but the Exception is exactly the same, even in the
same Sourceline: 572. Than I thought: that cann't be and tried to remove xalan.jar and xsltc.jar
but the result is the same!?

This happens only if I have <strip-space elements="..."/> in the stylesheet.


Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: default xsl transformer?

Posted by Vadim Gritsenko <va...@verizon.net>.
Enke, Michael wrote:

>Vadim Gritsenko wrote:
>  
>
>>>Q.2) From where TraxTransformer knows which one to use if no <transformer-factory/> is given?
>>>
>>>      
>>>
>> From configuration only.
>>    
>>
>
>>>From cocoon.roles?
>
>I have the problem that if I use <xsl:strip-space/> in xsl transformation
>I get a NullpointerException after some hundred elements.
>

This is not helpful. Where it happens?


>I now removed xalan.jar and xsltc.jar from WEB-INF/lib
>BUT: I got no error! From where xalan is taken, why xalan is found???
>

There are two other options:
1. JDK 1.4 has it built-in, in JDK1.3 you can have it in lib/ext
2. Tomcat exposes parser since some 4.+ version

Vadim


>Michael
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: default xsl transformer?

Posted by "Enke, Michael" <mi...@wincor-nixdorf.com>.
Vadim Gritsenko wrote:
> >Q.2) From where TraxTransformer knows which one to use if no <transformer-factory/> is given?
> >
> 
>  From configuration only.

>From cocoon.roles?

I have the problem that if I use <xsl:strip-space/> in xsl transformation
I get a NullpointerException after some hundred elements.
I now removed xalan.jar and xsltc.jar from WEB-INF/lib
BUT: I got no error! From where xalan is taken, why xalan is found???

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: default xsl transformer?

Posted by Vadim Gritsenko <va...@verizon.net>.
Enke, Michael wrote:

>Hi,
>I'm wondering what is the xsl-transformer used by current sitemap.xmap?
>I found there:
>
>    <!-- NOTE: This used to be the default XSLT processor. The default now is XSLTC -->
>    <map:transformer logger="sitemap.transformer.xslt" name="xalan" pool-grow="2" pool-max="32" pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer">
>      <use-request-parameters>false</use-request-parameters>
>      <use-browser-capabilities-db>false</use-browser-capabilities-db>
>      <use-deli>false</use-deli>
>    </map:transformer>
> 
>    <!--
>        NOTE: XSLTC is now the default processor. If you use Xalan extensions,
>        use the "xalan" transformer.
>     -->
>    <map:transformer logger="sitemap.transformer.xsltc" name="xslt" pool-grow="2" pool-max="32" pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer">
>      <use-request-parameters>false</use-request-parameters>
>      <use-browser-capabilities-db>false</use-browser-capabilities-db>
>      <use-deli>false</use-deli>
>      <!-- transformer-factory>org.apache.xalan.xsltc.trax.TransformerFactoryImpl</transformer-factory -->
>    </map:transformer>
>
>Both use the same src="org.apache.cocoon.transformation.TraxTransformer",
>they are different only in logger and name.
>
>Q.1) I guess it will be right to removve the comment for <transformer-factory/>?
>

They are identical ATM. If you uncomment this element, they will differ.


>Q.2) From where TraxTransformer knows which one to use if no <transformer-factory/> is given?
>

 From configuration only.

Vadim


>Regards,
>Michael
>  
>




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org