[Yanel-dev] URI resoving patch for BasicXMLResource

Michael Wechner michael.wechner at wyona.com
Fri Mar 7 00:24:00 CET 2008


Josias Thöny wrote:

> Evaldas Taroza wrote:
>
>> This solves the problem, that with BasicXMLResource the
>> <xsl:include href="yanelrepo:/xslt/my.xsl">
>> Did not work.
>
>
> I applied your patch, thank you very much.
> Finally we are able to re-use xslt code.


that's great indeed. I assume it also works for

<xsl:import href=".."/>

Maybe some documentation on this would be nice ;-)

Thanks very much

Michi

>
> josias
>
>>
>> Evaldas
>>
>>
>> ------------------------------------------------------------------------
>>
>> Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java
>> ===================================================================
>> --- impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java    
>> (revision 32696)
>> +++ impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java    
>> (working copy)
>> @@ -235,14 +235,16 @@
>>              xmlReader.setEntityResolver(catalogResolver);
>>              
>> xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", 
>> true);
>>  
>> +            SourceResolver uriResolver = new SourceResolver(this);
>> +                         // create xslt transformer:
>>              SAXTransformerFactory tf = 
>> (SAXTransformerFactory)TransformerFactory.newInstance();
>> +            tf.setURIResolver(uriResolver);
>>  
>>              String[] xsltPaths = viewDescriptor.getXSLTPaths();
>>              if (xsltPaths == null || xsltPaths.length == 0) {
>>                  xsltPaths = getXSLTPath(getPath());
>>              }
>> -            SourceResolver uriResolver = new SourceResolver(this);
>>                           TransformerHandler[] xsltHandlers = new 
>> TransformerHandler[xsltPaths.length];
>>              for (int i = 0; i < xsltPaths.length; i++) {
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Yanel-development mailing list
>> Yanel-development at wyona.com
>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner at wyona.com                        michi at apache.org
+41 44 272 91 61



More information about the Yanel-development mailing list